Skip to content

Commit

Permalink
i2c: muxes: fix wrong use of sizeof(ptr)
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Laurent Navet authored and Wolfram Sang committed Jan 22, 2013
1 parent bfd059d commit 43a2bd4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/i2c/muxes/i2c-mux-pinctrl.c
Original file line number Diff line number Diff line change
Expand Up @@ -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");
Expand Down

0 comments on commit 43a2bd4

Please sign in to comment.