[PATCH] fixup! regulator: Add Fairchild FAN53555 driver
Ahmad Fatoum
a.fatoum at pengutronix.de
Mon Jul 1 11:12:39 PDT 2024
GCC reports:
drivers/regulator/fan53555.c:362:17: warning: ‘mode_reg’ may be used
uninitialized [-Wmaybe-uninitialized]
362 | regmap_update_bits(di->rdev.regmap, mode_reg, mode_mask, 0);
Fix this by returning -EINVAL in that case, which is the error code used
earlier if the vendor is an unexpected value.
Cc: Alexander Shiyan <eagle.alexander923 at gmail.com>
Signed-off-by: Ahmad Fatoum <a.fatoum at pengutronix.de>
---
drivers/regulator/fan53555.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/drivers/regulator/fan53555.c b/drivers/regulator/fan53555.c
index d406d0b54a3e..f73511b36b20 100644
--- a/drivers/regulator/fan53555.c
+++ b/drivers/regulator/fan53555.c
@@ -315,6 +315,8 @@ static int fan53555_device_setup(struct fan53555_device_info *di)
case FAN53555_VSEL_ID_1:
mode_reg = FAN53555_VSEL0;
break;
+ default:
+ return -EINVAL;
}
break;
case FAN53526_VENDOR_TCS:
--
2.39.2
More information about the barebox
mailing list