Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 43a2bd42 authored by Laurent Navet's avatar Laurent Navet Committed by Wolfram Sang
Browse files

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: default avatarLaurent Navet <laurent.navet@gmail.com>
Acked-by: default avatarJean Delvare <khali@linux-fr.org>
Signed-off-by: default avatarWolfram Sang <w.sang@pengutronix.de>
parent bfd059da
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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");