Commit 9a78b169 authored by Markus Elfring's avatar Markus Elfring Committed by Stephen Boyd

clk: si5351: Use devm_kcalloc() in si5351_i2c_probe()

Multiplications for the size determination of memory allocations
indicated that array data structures should be processed.
Thus use the corresponding function "devm_kcalloc".

This issue was detected by using the Coccinelle software.
Signed-off-by: default avatarMarkus Elfring <elfring@users.sourceforge.net>
Signed-off-by: default avatarStephen Boyd <sboyd@codeaurora.org>
parent 1e5c8444
...@@ -1535,9 +1535,9 @@ static int si5351_i2c_probe(struct i2c_client *client, ...@@ -1535,9 +1535,9 @@ static int si5351_i2c_probe(struct i2c_client *client,
else else
parent_names[1] = si5351_pll_names[1]; parent_names[1] = si5351_pll_names[1];
drvdata->msynth = devm_kzalloc(&client->dev, num_clocks * drvdata->msynth = devm_kcalloc(&client->dev, num_clocks,
sizeof(*drvdata->msynth), GFP_KERNEL); sizeof(*drvdata->msynth), GFP_KERNEL);
drvdata->clkout = devm_kzalloc(&client->dev, num_clocks * drvdata->clkout = devm_kcalloc(&client->dev, num_clocks,
sizeof(*drvdata->clkout), GFP_KERNEL); sizeof(*drvdata->clkout), GFP_KERNEL);
drvdata->num_clkout = num_clocks; drvdata->num_clkout = num_clocks;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment