From: Markus Elfring Date: Wed, 27 Sep 2017 19:24:43 +0000 (+0200) Subject: clk: versatile: Improve sizeof() usage X-Git-Tag: v4.15-rc1~48^2^2~3 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=a72da43c92dc09488ac2944b103de037c435302a;p=thirdparty%2Fkernel%2Flinux.git 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 Acked-by: Linus Walleij Signed-off-by: Stephen Boyd --- diff --git a/drivers/clk/versatile/clk-icst.c b/drivers/clk/versatile/clk-icst.c index 20ab4ceffb28a..dafe7a45875d9 100644 --- a/drivers/clk/versatile/clk-icst.c +++ b/drivers/clk/versatile/clk-icst.c @@ -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);