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>
This commit is contained in:
parent
e343b81e4d
commit
a72da43c92
@ -359,7 +359,7 @@ static struct clk *icst_clk_setup(struct device *dev,
|
|||||||
struct clk_init_data init;
|
struct clk_init_data init;
|
||||||
struct icst_params *pclone;
|
struct icst_params *pclone;
|
||||||
|
|
||||||
icst = kzalloc(sizeof(struct clk_icst), GFP_KERNEL);
|
icst = kzalloc(sizeof(*icst), GFP_KERNEL);
|
||||||
if (!icst)
|
if (!icst)
|
||||||
return ERR_PTR(-ENOMEM);
|
return ERR_PTR(-ENOMEM);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user