Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

rtc: max31335: Fix ignored return value in set_alarm

Return the result from regmap_update_bits() instead of ignoring it
and always returning 0.

Fixes: dedaf03b99d6 ("rtc: max31335: add driver support")
Signed-off-by: Nuno Sá <nuno.sa@analog.com>
Link: https://patch.msgid.link/20251128-max31335-handler-error-v1-1-6b6f7f78dbda@analog.com
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>

authored by

Nuno Sá and committed by
Alexandre Belloni
f07640f9 d1220e47

+2 -4
+2 -4
drivers/rtc/rtc-max31335.c
··· 391 391 if (ret) 392 392 return ret; 393 393 394 - ret = regmap_update_bits(max31335->regmap, max31335->chip->int_status_reg, 395 - MAX31335_STATUS1_A1F, 0); 396 - 397 - return 0; 394 + return regmap_update_bits(max31335->regmap, max31335->chip->int_status_reg, 395 + MAX31335_STATUS1_A1F, 0); 398 396 } 399 397 400 398 static int max31335_alarm_irq_enable(struct device *dev, unsigned int enabled)