summaryrefslogtreecommitdiffstats
path: root/drivers/i2c/muxes
diff options
context:
space:
mode:
authorDan Carpenter <dan.carpenter@oracle.com>2017-08-17 13:53:55 +0200
committerPeter Rosin <peda@axentia.se>2017-08-17 14:19:56 +0200
commitbe9bac020cacd0cdf758b4a6d847a0ba835475b9 (patch)
tree6dff72c50fc2e85af6fb6a425192d41a0559dcb7 /drivers/i2c/muxes
parenti2c: mux: pinctrl: drop the idle_state member (diff)
downloadlinux-be9bac020cacd0cdf758b4a6d847a0ba835475b9.tar.xz
linux-be9bac020cacd0cdf758b4a6d847a0ba835475b9.zip
i2c: mux: pinctrl: potential NULL dereference on error
If i2c_mux_alloc() fails then we'd have a NULL dereference here. Fixes: c4aee3e1b0de ("i2c: mux: pinctrl: remove platform_data") Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Peter Rosin <peda@axentia.se>
Diffstat (limited to 'drivers/i2c/muxes')
-rw-r--r--drivers/i2c/muxes/i2c-mux-pinctrl.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/i2c/muxes/i2c-mux-pinctrl.c b/drivers/i2c/muxes/i2c-mux-pinctrl.c
index 20b90a7a1e61..cc6818aabab5 100644
--- a/drivers/i2c/muxes/i2c-mux-pinctrl.c
+++ b/drivers/i2c/muxes/i2c-mux-pinctrl.c
@@ -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;
}