This check is carried out after getting the regulator, and the device can be disabled if an error occurs. Signed-off-by: Javier Carrasco <javier.carrasco.cruz@xxxxxxxxx> --- drivers/hwmon/chipcap2.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/hwmon/chipcap2.c b/drivers/hwmon/chipcap2.c index 88689f4eb598..02764689ed21 100644 --- a/drivers/hwmon/chipcap2.c +++ b/drivers/hwmon/chipcap2.c @@ -747,7 +747,7 @@ static int cc2_probe(struct i2c_client *client) ret = cc2_request_ready_irq(data, dev); if (ret) { dev_err_probe(dev, ret, "Failed to request ready irq\n"); - return ret; + goto disable; } ret = cc2_request_alarm_irqs(data, dev); -- 2.43.0