From 0b10adbae303ecdb78c779eabb7ab587c91d324c Mon Sep 17 00:00:00 2001 From: Markus Elfring Date: Wed, 27 Sep 2017 20:30:53 +0200 Subject: clk: ux500: Improve sizeof() usage Replace the specification of data structures by pointer dereferences 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: Ulf Hansson Signed-off-by: Stephen Boyd --- drivers/clk/ux500/clk-prcc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'drivers/clk/ux500/clk-prcc.c') diff --git a/drivers/clk/ux500/clk-prcc.c b/drivers/clk/ux500/clk-prcc.c index 5ca07e6d1f64..7cfb59c9136d 100644 --- a/drivers/clk/ux500/clk-prcc.c +++ b/drivers/clk/ux500/clk-prcc.c @@ -107,7 +107,7 @@ static struct clk *clk_reg_prcc(const char *name, return ERR_PTR(-EINVAL); } - clk = kzalloc(sizeof(struct clk_prcc), GFP_KERNEL); + clk = kzalloc(sizeof(*clk), GFP_KERNEL); if (!clk) return ERR_PTR(-ENOMEM); -- cgit v1.2.3-70-g09d2