aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorColin Ian King <colin.king@canonical.com>2014-02-11 04:38:53 -0500
committerLee Jones <lee.jones@linaro.org>2014-03-13 18:21:48 -0400
commit39a85bcbfc54d602934e2657c146c299d71b27ba (patch)
treeae7c658afbc7ec6a6f0a840c01d47c2ccc244df2
parent0414855fdc4a40da05221fc6062cccbc0c30f169 (diff)
mfd: omap-usb-tll: Fix cppcheck sizeof warning
Static analysis from cppcheck issued the following warning: [drivers/mfd/omap-usb-tll.c:255]: (warning) Found calculation inside sizeof(). The current size calculation is not obvious and is easy to miscomprehend, so re-work the size of the allocation based on the size of the struct pointer and quantity to allocate. Signed-off-by: Colin Ian King <colin.king@canonical.com> Signed-off-by: Lee Jones <lee.jones@linaro.org>
-rw-r--r--drivers/mfd/omap-usb-tll.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/mfd/omap-usb-tll.c b/drivers/mfd/omap-usb-tll.c
index 5ee50f779ef6..532eacab6b46 100644
--- a/drivers/mfd/omap-usb-tll.c
+++ b/drivers/mfd/omap-usb-tll.c
@@ -252,7 +252,7 @@ static int usbtll_omap_probe(struct platform_device *pdev)
252 break; 252 break;
253 } 253 }
254 254
255 tll->ch_clk = devm_kzalloc(dev, sizeof(struct clk * [tll->nch]), 255 tll->ch_clk = devm_kzalloc(dev, sizeof(struct clk *) * tll->nch,
256 GFP_KERNEL); 256 GFP_KERNEL);
257 if (!tll->ch_clk) { 257 if (!tll->ch_clk) {
258 ret = -ENOMEM; 258 ret = -ENOMEM;