diff options
author | Laurent Navet <laurent.navet@gmail.com> | 2013-01-08 08:40:09 -0500 |
---|---|---|
committer | Wolfram Sang <w.sang@pengutronix.de> | 2013-01-22 03:54:32 -0500 |
commit | 43a2bd42d077de6ad40b00a2abfc4677e24d239c (patch) | |
tree | 780659f4b05f32586cded38efbee30e5e789302f /drivers | |
parent | bfd059da9503e0091541285cb0481f66b95c0296 (diff) |
i2c: muxes: fix wrong use of sizeof(ptr)
sizeof when applied to a pointer typed expression gives the size of
the pointer
The semantic patch that makes this output is available
in scripts/coccinelle/misc/noderef.cocci.
More information about semantic patching is available at
http://coccinelle.lip6.fr/
Signed-off-by: Laurent Navet <laurent.navet@gmail.com>
Acked-by: Jean Delvare <khali@linux-fr.org>
Signed-off-by: Wolfram Sang <w.sang@pengutronix.de>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/i2c/muxes/i2c-mux-pinctrl.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/i2c/muxes/i2c-mux-pinctrl.c b/drivers/i2c/muxes/i2c-mux-pinctrl.c index 1e44d04d1b22..a43c0ce5e3d8 100644 --- a/drivers/i2c/muxes/i2c-mux-pinctrl.c +++ b/drivers/i2c/muxes/i2c-mux-pinctrl.c | |||
@@ -167,7 +167,7 @@ static int i2c_mux_pinctrl_probe(struct platform_device *pdev) | |||
167 | } | 167 | } |
168 | 168 | ||
169 | mux->busses = devm_kzalloc(&pdev->dev, | 169 | mux->busses = devm_kzalloc(&pdev->dev, |
170 | sizeof(mux->busses) * mux->pdata->bus_count, | 170 | sizeof(*mux->busses) * mux->pdata->bus_count, |
171 | GFP_KERNEL); | 171 | GFP_KERNEL); |
172 | if (!mux->busses) { | 172 | if (!mux->busses) { |
173 | dev_err(&pdev->dev, "Cannot allocate busses\n"); | 173 | dev_err(&pdev->dev, "Cannot allocate busses\n"); |