diff options
author | Markus Elfring <elfring@users.sourceforge.net> | 2017-09-27 14:30:53 -0400 |
---|---|---|
committer | Stephen Boyd <sboyd@codeaurora.org> | 2017-11-13 20:42:25 -0500 |
commit | 0b10adbae303ecdb78c779eabb7ab587c91d324c (patch) | |
tree | c8b4ab1370fa0133e9470e0bef772253a1ec04b4 /drivers/clk/ux500/clk-sysctrl.c | |
parent | 7a294dc6c85d6cea181055c5412bb44a499e3816 (diff) |
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-sysctrl.c')
-rw-r--r-- | drivers/clk/ux500/clk-sysctrl.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/clk/ux500/clk-sysctrl.c b/drivers/clk/ux500/clk-sysctrl.c index e0a834c08a04..7c0403b733ae 100644 --- a/drivers/clk/ux500/clk-sysctrl.c +++ b/drivers/clk/ux500/clk-sysctrl.c | |||
@@ -139,7 +139,7 @@ static struct clk *clk_reg_sysctrl(struct device *dev, | |||
139 | return ERR_PTR(-EINVAL); | 139 | return ERR_PTR(-EINVAL); |
140 | } | 140 | } |
141 | 141 | ||
142 | clk = devm_kzalloc(dev, sizeof(struct clk_sysctrl), GFP_KERNEL); | 142 | clk = devm_kzalloc(dev, sizeof(*clk), GFP_KERNEL); |
143 | if (!clk) | 143 | if (!clk) |
144 | return ERR_PTR(-ENOMEM); | 144 | return ERR_PTR(-ENOMEM); |
145 | 145 | ||