Skip to content

Commit 4e5eb7e

Browse files
Dan Carpenteralexandrebelloni
authored andcommitted
rtc: pcf2127: fix error code in pcf2127_enable_ts()
This error path accidentally returns success. Return -EINVAL instead. Fixes: 420cc9e ("rtc: pcf2127: add support for multiple TS functions") Signed-off-by: Dan Carpenter <[email protected]> Reviewed-by: Bruno Thomsen <[email protected]> Reviewed-by: Hugo Villeneuve <[email protected]> Reviewed-by: Hugo Villeneuve <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Alexandre Belloni <[email protected]>
1 parent d890cfc commit 4e5eb7e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/rtc/rtc-pcf2127.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1060,7 +1060,7 @@ static int pcf2127_enable_ts(struct device *dev, int ts_id)
10601060
if (pcf2127->cfg->ts[ts_id].gnd_detect_bit == 0) {
10611061
dev_err(dev, "%s: tamper detection to GND configuration invalid\n",
10621062
__func__);
1063-
return ret;
1063+
return -EINVAL;
10641064
}
10651065

10661066
/*

0 commit comments

Comments
 (0)