[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20240812-chipcap2-probe-improvements-v1-2-3cdff6d16897@gmail.com>
Date: Mon, 12 Aug 2024 17:43:03 +0200
From: Javier Carrasco <javier.carrasco.cruz@...il.com>
To: Jean Delvare <jdelvare@...e.com>, Guenter Roeck <linux@...ck-us.net>
Cc: linux-hwmon@...r.kernel.org, linux-kernel@...r.kernel.org,
Javier Carrasco <javier.carrasco.cruz@...il.com>
Subject: [PATCH 2/2] hwmon: chipcap2: disable sensor if request ready irq
fails
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@...il.com>
---
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
Powered by blists - more mailing lists