From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753499AbbDCQbe (ORCPT ); Fri, 3 Apr 2015 12:31:34 -0400 Received: from comal.ext.ti.com ([198.47.26.152]:34248 "EHLO comal.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752753AbbDCQ05 (ORCPT ); Fri, 3 Apr 2015 12:26:57 -0400 From: Kishon Vijay Abraham I To: CC: , Subject: [PATCH 03/20] phy: berlin-sata: Use devm_kcalloc at appropriate place Date: Fri, 3 Apr 2015 21:56:31 +0530 Message-ID: <1428078408-13344-4-git-send-email-kishon@ti.com> X-Mailer: git-send-email 1.7.9.5 In-Reply-To: <1428078408-13344-1-git-send-email-kishon@ti.com> References: <1428078408-13344-1-git-send-email-kishon@ti.com> MIME-Version: 1.0 Content-Type: text/plain Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Axel Lin Prefer devm_kcalloc over devm_kzalloc with multiply. Signed-off-by: Axel Lin Signed-off-by: Kishon Vijay Abraham I --- 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.7.9.5