[PATCH] drivers/rtc: remove redundant ret variable

cgel.zte@gmail.com posted 1 patch 4 years, 5 months ago
drivers/rtc/rtc-tps65910.c | 5 +----
1 file changed, 1 insertion(+), 4 deletions(-)
[PATCH] drivers/rtc: remove redundant ret variable
Posted by cgel.zte@gmail.com 4 years, 5 months ago
From: Minghao Chi <chi.minghao@zte.com.cn>

Return value from tps65910_rtc_set_calibration() directly instead
of taking this in another redundant variable.

Reported-by: Zeal Robot <zealci@zte.com.cn>
Signed-off-by: Minghao Chi <chi.minghao@zte.com.cn>
Signed-off-by: CGEL ZTE <cgel.zte@gmail.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