aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/clk/ux500/clk-prcc.c
diff options
context:
space:
mode:
authorMarkus Elfring <elfring@users.sourceforge.net>2017-09-27 20:30:53 +0200
committerStephen Boyd <sboyd@codeaurora.org>2017-11-13 17:42:25 -0800
commit0b10adbae303ecdb78c779eabb7ab587c91d324c (patch)
treec8b4ab1370fa0133e9470e0bef772253a1ec04b4 /drivers/clk/ux500/clk-prcc.c
parentclk: ux500: Delete error messages for failed memory allocations (diff)
downloadlinux-dev-0b10adbae303ecdb78c779eabb7ab587c91d324c.tar.xz
linux-dev-0b10adbae303ecdb78c779eabb7ab587c91d324c.zip
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 <elfring@users.sourceforge.net> Acked-by: Ulf Hansson <ulf.hansson@linaro.org> Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
Diffstat (limited to 'drivers/clk/ux500/clk-prcc.c')
-rw-r--r--drivers/clk/ux500/clk-prcc.c2
1 files changed, 1 insertions, 1 deletions
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);