Commit be9bac02 authored by Dan Carpenter's avatar Dan Carpenter Committed by 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: default avatarDan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: default avatarPeter Rosin <peda@axentia.se>
parent 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%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment