Skip to content

Commit 338b505

Browse files
raagjadavgeertu
authored andcommitted
clk: renesas: rzv2h: Use devm_kmemdup_array()
Convert to use devm_kmemdup_array() which is more robust. Signed-off-by: Raag Jadav <[email protected]> Reviewed-by: Geert Uytterhoeven <[email protected]> Link: https://lore.kernel.org/[email protected] Signed-off-by: Geert Uytterhoeven <[email protected]>
1 parent 8b8ca27 commit 338b505

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

drivers/clk/renesas/rzv2h-cpg.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1031,8 +1031,8 @@ static int __init rzv2h_cpg_probe(struct platform_device *pdev)
10311031
/* Adjust for CPG_BUS_m_MSTOP starting from m = 1 */
10321032
priv->mstop_count -= 16;
10331033

1034-
priv->resets = devm_kmemdup(dev, info->resets, sizeof(*info->resets) *
1035-
info->num_resets, GFP_KERNEL);
1034+
priv->resets = devm_kmemdup_array(dev, info->resets, info->num_resets,
1035+
sizeof(*info->resets), GFP_KERNEL);
10361036
if (!priv->resets)
10371037
return -ENOMEM;
10381038

0 commit comments

Comments
 (0)