From: Minghao Chi <chi.minghao@xxxxxxxxxx> Return value from tps65910_rtc_set_calibration() directly instead of taking this in another redundant variable. Reported-by: Zeal Robot <zealci@xxxxxxxxxx> Signed-off-by: Minghao Chi <chi.minghao@xxxxxxxxxx> Signed-off-by: CGEL ZTE <cgel.zte@xxxxxxxxx> --- 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