Linux-PHY Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH linux-next] phy: broadcom: use function devm_kcalloc() instead of devm_kzalloc()
@ 2022-09-16  6:21 cgel.zte
  2022-09-20  6:20 ` Vinod Koul
  0 siblings, 1 reply; 2+ messages in thread
From: cgel.zte @ 2022-09-16  6:21 UTC (permalink / raw)
  To: vkoul; +Cc: kishon, linux-phy, linux-kernel, ye xingchen, Zeal Robot

From: ye xingchen <ye.xingchen@zte.com.cn>

Use 2-factor multiplication argument form devm_kcalloc() instead
of devm_kzalloc().

Reported-by: Zeal Robot <zealci@zte.com.cn>
Signed-off-by: ye xingchen <ye.xingchen@zte.com.cn>
---
 drivers/phy/broadcom/phy-bcm-sr-usb.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/phy/broadcom/phy-bcm-sr-usb.c b/drivers/phy/broadcom/phy-bcm-sr-usb.c
index 0002da3b5b5d..0d393e0cc7bb 100644
--- a/drivers/phy/broadcom/phy-bcm-sr-usb.c
+++ b/drivers/phy/broadcom/phy-bcm-sr-usb.c
@@ -236,7 +236,7 @@ static int bcm_usb_phy_create(struct device *dev, struct device_node *node,
 	int idx;
 
 	if (version == BCM_SR_USB_COMBO_PHY) {
-		phy_cfg = devm_kzalloc(dev, NUM_BCM_SR_USB_COMBO_PHYS *
+		phy_cfg = devm_kcalloc(dev, NUM_BCM_SR_USB_COMBO_PHYS,
 				       sizeof(struct bcm_usb_phy_cfg),
 				       GFP_KERNEL);
 		if (!phy_cfg)
-- 
2.25.1

-- 
linux-phy mailing list
linux-phy@lists.infradead.org
https://lists.infradead.org/mailman/listinfo/linux-phy

^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2022-09-20  6:21 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-09-16  6:21 [PATCH linux-next] phy: broadcom: use function devm_kcalloc() instead of devm_kzalloc() cgel.zte
2022-09-20  6:20 ` Vinod Koul

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox