From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753895AbbCEBkt (ORCPT ); Wed, 4 Mar 2015 20:40:49 -0500 Received: from mail-pd0-f181.google.com ([209.85.192.181]:45060 "EHLO mail-pd0-f181.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753746AbbCEBkp (ORCPT ); Wed, 4 Mar 2015 20:40:45 -0500 Message-ID: <1425519641.1637.2.camel@phoenix> Subject: [PATCH] phy: berlin-sata: Use devm_kcalloc at appropriate place From: Axel Lin To: Kishon Vijay Abraham I Cc: Antoine Tenart , "linux-kernel@vger.kernel.org" Date: Thu, 05 Mar 2015 09:40:41 +0800 Content-Type: text/plain; charset="UTF-8" X-Mailer: Evolution 3.10.4-0ubuntu2 Mime-Version: 1.0 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Prefer devm_kcalloc over devm_kzalloc with multiply. Signed-off-by: Axel Lin --- drivers/phy/phy-berlin-sata.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/phy/phy-berlin-sata.c b/drivers/phy/phy-berlin-sata.c index 099eee8..6f3e06d 100644 --- a/drivers/phy/phy-berlin-sata.c +++ b/drivers/phy/phy-berlin-sata.c @@ -218,7 +218,7 @@ static int phy_berlin_sata_probe(struct platform_device *pdev) if (priv->nphys == 0) return -ENODEV; - priv->phys = devm_kzalloc(dev, priv->nphys * sizeof(*priv->phys), + priv->phys = devm_kcalloc(dev, priv->nphys, sizeof(*priv->phys), GFP_KERNEL); if (!priv->phys) return -ENOMEM; -- 1.9.1