diff options
author | Laurent Navet <laurent.navet@gmail.com> | 2013-01-08 14:40:09 +0100 |
---|---|---|
committer | Wolfram Sang <w.sang@pengutronix.de> | 2013-01-22 09:54:32 +0100 |
commit | 43a2bd42d077de6ad40b00a2abfc4677e24d239c (patch) | |
tree | 780659f4b05f32586cded38efbee30e5e789302f | |
parent | bfd059da9503e0091541285cb0481f66b95c0296 (diff) | |
download | blackbird-op-linux-43a2bd42d077de6ad40b00a2abfc4677e24d239c.tar.gz blackbird-op-linux-43a2bd42d077de6ad40b00a2abfc4677e24d239c.zip |
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>
-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) } mux->busses = devm_kzalloc(&pdev->dev, - sizeof(mux->busses) * mux->pdata->bus_count, + sizeof(*mux->busses) * mux->pdata->bus_count, GFP_KERNEL); if (!mux->busses) { dev_err(&pdev->dev, "Cannot allocate busses\n"); |