aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/rtc/rtc-gamecube.c
diff options
context:
space:
mode:
authorYuan Can <yuancan@huawei.com>2022-05-11 07:13:54 +0000
committerAlexandre Belloni <alexandre.belloni@bootlin.com>2022-05-18 14:52:17 +0200
commit6ddabcb106280db0f7344850adfce3dd6b171cbd (patch)
treea910e8f06995db36109b964e06ea895c15d70bf6 /drivers/rtc/rtc-gamecube.c
parenta37bdde620c2eb89505ee42ff60ed7030b50f71a (diff)
downloadlinux-6ddabcb106280db0f7344850adfce3dd6b171cbd.tar.gz
rtc: gamecube: Add missing iounmap in gamecube_rtc_read_offset_from_sram
The hw_srnprot needs to be unmapped when gamecube_rtc_read_offset_from_sram returns. Fixs: 86559400b3ef9d (rtc: gamecube: Add a RTC driver for the GameCube, Wii and Wii U) Signed-off-by: Yuan Can <yuancan@huawei.com> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Link: https://lore.kernel.org/r/20220511071354.46202-1-yuancan@huawei.com
Diffstat (limited to 'drivers/rtc/rtc-gamecube.c')
-rw-r--r--drivers/rtc/rtc-gamecube.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/rtc/rtc-gamecube.c b/drivers/rtc/rtc-gamecube.c
index 18ca3b38b2d04..c2717bb52b2be 100644
--- a/drivers/rtc/rtc-gamecube.c
+++ b/drivers/rtc/rtc-gamecube.c
@@ -267,6 +267,7 @@ static int gamecube_rtc_read_offset_from_sram(struct priv *d)
ret = regmap_read(d->regmap, RTC_SRAM_BIAS, &d->rtc_bias);
if (ret) {
pr_err("failed to get the RTC bias\n");
+ iounmap(hw_srnprot);
return -1;
}