aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDan Carpenter <[email protected]>2023-07-31 17:09:30 +0300
committerAlexandre Belloni <[email protected]>2023-08-17 00:58:35 +0200
commit4e5eb7ef73c4c45e2e621eb51a76565153b63afe (patch)
tree0e1d71c1a1eac8652653a3d01d7fece851a38da3
parentd890cfc25fe9421ffdff3a9ea678172addb36762 (diff)
rtc: pcf2127: fix error code in pcf2127_enable_ts()
This error path accidentally returns success. Return -EINVAL instead. Fixes: 420cc9e850db ("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]>
-rw-r--r--drivers/rtc/rtc-pcf2127.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/rtc/rtc-pcf2127.c b/drivers/rtc/rtc-pcf2127.c
index 78141bb06ab0..988cad171174 100644
--- a/drivers/rtc/rtc-pcf2127.c
+++ b/drivers/rtc/rtc-pcf2127.c
@@ -1060,7 +1060,7 @@ static int pcf2127_enable_ts(struct device *dev, int ts_id)
if (pcf2127->cfg->ts[ts_id].gnd_detect_bit == 0) {
dev_err(dev, "%s: tamper detection to GND configuration invalid\n",
__func__);
- return ret;
+ return -EINVAL;
}
/*