Skip to contentSkip to conversation

drivers/rtc: remove redundant ret variable

PATCH New [email protected] 1 participant 1 message Jan 10, 2022 Real time clock (RTC)

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 drivers/rtc: remove redundant ret variable

From: Minghao Chi <[email protected]>

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

---
 drivers/rtc/rtc-tps65910.c | 5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)
drivers/rtc/rtc-tps65910.c +1 -4
index 75e4c2d777b9..b0a95d9eb368 100644
@@ -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)
Signature · 1 line
2.25.1