i2c: mux: pinctrl: potential NULL dereference on error
authorDan Carpenter <dan.carpenter@oracle.com>
Thu, 17 Aug 2017 11:53:55 +0000 (14:53 +0300)
committerPeter Rosin <peda@axentia.se>
Thu, 17 Aug 2017 12:19:56 +0000 (14:19 +0200)
commitbe9bac020cacd0cdf758b4a6d847a0ba835475b9
tree6dff72c50fc2e85af6fb6a425192d41a0559dcb7
parentfc2046718a1bdccc38d749c4453215891f7a014c
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>
drivers/i2c/muxes/i2c-mux-pinctrl.c