mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-08-23 17:30:02 +00:00
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
1 changed files with 1 additions and 1 deletions
|
@ -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);
|
||||
|
||||
|
|
Loading…
Reference in a new issue