[PATCH 2/2] hwmon: chipcap2: disable sensor if request ready irq fails

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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





[Index of Archives]     [LM Sensors]     [Linux Sound]     [ALSA Users]     [ALSA Devel]     [Linux Audio Users]     [Linux Media]     [Kernel]     [Gimp]     [Yosemite News]     [Linux Media]

  Powered by Linux