提交 43a2bd42 编写于 作者: L Laurent Navet 提交者: Wolfram Sang

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: NLaurent Navet <laurent.navet@gmail.com>
Acked-by: NJean Delvare <khali@linux-fr.org>
Signed-off-by: NWolfram Sang <w.sang@pengutronix.de>
上级 bfd059da
...@@ -167,7 +167,7 @@ static int i2c_mux_pinctrl_probe(struct platform_device *pdev) ...@@ -167,7 +167,7 @@ static int i2c_mux_pinctrl_probe(struct platform_device *pdev)
} }
mux->busses = devm_kzalloc(&pdev->dev, mux->busses = devm_kzalloc(&pdev->dev,
sizeof(mux->busses) * mux->pdata->bus_count, sizeof(*mux->busses) * mux->pdata->bus_count,
GFP_KERNEL); GFP_KERNEL);
if (!mux->busses) { if (!mux->busses) {
dev_err(&pdev->dev, "Cannot allocate busses\n"); dev_err(&pdev->dev, "Cannot allocate busses\n");
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册