[<prev] [next>] [day] [month] [year] [list]
Message-Id: <20220110104301.646715-1-chi.minghao@zte.com.cn>
Date: Mon, 10 Jan 2022 10:43:01 +0000
From: cgel.zte@...il.com
To: a.zummo@...ertech.it
Cc: alexandre.belloni@...tlin.com, linux-rtc@...r.kernel.org,
linux-kernel@...r.kernel.org, Minghao Chi <chi.minghao@....com.cn>,
Zeal Robot <zealci@....com.cn>, CGEL ZTE <cgel.zte@...il.com>
Subject: [PATCH] drivers/rtc: remove redundant ret variable
From: Minghao Chi <chi.minghao@....com.cn>
Return value from tps65910_rtc_set_calibration() directly instead
of taking this in another redundant variable.
Reported-by: Zeal Robot <zealci@....com.cn>
Signed-off-by: Minghao Chi <chi.minghao@....com.cn>
Signed-off-by: CGEL ZTE <cgel.zte@...il.com>
---
drivers/rtc/rtc-tps65910.c | 5 +----
1 file changed, 1 insertion(+), 4 deletions(-)
diff --git a/drivers/rtc/rtc-tps65910.c b/drivers/rtc/rtc-tps65910.c
index 75e4c2d777b9..b0a95d9eb368 100644
--- a/drivers/rtc/rtc-tps65910.c
+++ b/drivers/rtc/rtc-tps65910.c
@@ -304,7 +304,6 @@ static int tps65910_set_offset(struct device *dev, long offset)
{
int calibration;
s64 tmp;
- int ret;
/* Make sure offset value is within supported range */
if (offset < MIN_OFFSET || offset > MAX_OFFSET)
@@ -321,9 +320,7 @@ static int tps65910_set_offset(struct device *dev, long offset)
/* Offset value operates in negative way, so swap sign */
calibration = (int)-tmp;
- ret = tps65910_rtc_set_calibration(dev, calibration);
-
- return ret;
+ return tps65910_rtc_set_calibration(dev, calibration);
}
static irqreturn_t tps65910_rtc_interrupt(int irq, void *rtc)
--
2.25.1
Powered by blists - more mailing lists