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@xxxxxxxxx> Signed-off-by: Ahmad Fatoum <a.fatoum@xxxxxxxxxxxxxx> --- 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