1
0
Fork 0

clk: versatile: Improve sizeof() usage

Replace the specification of a data structure by a pointer
dereference as the parameter for the operator "sizeof" to make
the corresponding size determination a bit safer according to the
Linux coding style convention.

This issue was detected by using the Coccinelle software.

Signed-off-by: Markus Elfring <elfring@users.sourceforge.net>
Acked-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
hifive-unleashed-5.1
Markus Elfring 2017-09-27 21:24:43 +02:00 committed by Stephen Boyd
parent e343b81e4d
commit a72da43c92
1 changed files with 1 additions and 1 deletions

View File

@ -359,7 +359,7 @@ static struct clk *icst_clk_setup(struct device *dev,
struct clk_init_data init;
struct icst_params *pclone;
icst = kzalloc(sizeof(struct clk_icst), GFP_KERNEL);
icst = kzalloc(sizeof(*icst), GFP_KERNEL);
if (!icst)
return ERR_PTR(-ENOMEM);