提交 be9bac02 编写于 作者: D Dan Carpenter 提交者: Peter Rosin

i2c: mux: pinctrl: potential NULL dereference on error

If i2c_mux_alloc() fails then we'd have a NULL dereference here.

Fixes: c4aee3e1 ("i2c: mux: pinctrl: remove platform_data")
Signed-off-by: NDan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: NPeter Rosin <peda@axentia.se>
上级 fc204671
......@@ -173,7 +173,7 @@ static int i2c_mux_pinctrl_probe(struct platform_device *pdev)
err_del_adapter:
i2c_mux_del_adapters(muxc);
err_put_parent:
i2c_put_adapter(muxc->parent);
i2c_put_adapter(parent);
return ret;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册
新手
引导
客服 返回
顶部