On 8/12/24 08:43, Javier Carrasco wrote:
This check is carried out after getting the regulator, and the device
can be disabled if an error occurs.
I do not see a possible path for a call to cc2_enable() at this point,
meaning the regulator won't ever be enabled. Please provide a better
explanation why this patch would be necessary.
Guenter
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);