From: Alexandre Belloni Date: Thu, 15 Oct 2020 19:11:32 +0000 (+0200) Subject: rtc: r9701: remove useless memset X-Git-Tag: v5.10.7~1359^2~3 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=2a8f3380c9e50a36b99a92febfd78f7c7afd29b0;p=platform%2Fkernel%2Flinux-rpi.git rtc: r9701: remove useless memset The RTC core already sets to zero the struct rtc_tie it passes to the driver, avoid doing it a second time. Signed-off-by: Alexandre Belloni Link: https://lore.kernel.org/r/20201015191135.471249-3-alexandre.belloni@bootlin.com --- diff --git a/drivers/rtc/rtc-r9701.c b/drivers/rtc/rtc-r9701.c index f8f7044..4b688e9 100644 --- a/drivers/rtc/rtc-r9701.c +++ b/drivers/rtc/rtc-r9701.c @@ -75,8 +75,6 @@ static int r9701_get_datetime(struct device *dev, struct rtc_time *dt) if (ret) return ret; - memset(dt, 0, sizeof(*dt)); - dt->tm_sec = bcd2bin(buf[0]); /* RSECCNT */ dt->tm_min = bcd2bin(buf[1]); /* RMINCNT */ dt->tm_hour = bcd2bin(buf[2]); /* RHRCNT */