mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-12-01 08:20:44 -05:00
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 <[email protected]> Acked-by: Jean Delvare <[email protected]> Signed-off-by: Wolfram Sang <[email protected]>
This commit is contained in:
parent
bfd059da95
commit
43a2bd42d0
1 changed files with 1 additions and 1 deletions
|
|
@ -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");
|
||||
|
|
|
|||
Loading…
Reference in a new issue