diff --git a/drivers/hwmon/mxc_mma8451.c b/drivers/hwmon/mxc_mma8451.c index 9d6c53927757..3c6dbbe71bc1 100644 --- a/drivers/hwmon/mxc_mma8451.c +++ b/drivers/hwmon/mxc_mma8451.c @@ -510,6 +510,10 @@ err_register_polled_device: err_alloc_poll_device: hwmon_device_unregister(&client->dev); err_out: + if (!IS_ERR(vdd)) + regulator_disable(vdd); + if (!IS_ERR(vdd_io)) + regulator_disable(vdd_io); return result; }