summaryrefslogtreecommitdiff
path: root/drivers/rtc/rtc-gamecube.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2022-10-14 18:36:42 -0700
committerLinus Torvalds <torvalds@linux-foundation.org>2022-10-14 18:36:42 -0700
commitb7270c69a36efc61ed6ebd31a8a458f354a6edc0 (patch)
tree8534bfbe4513a7bfa1aeae65a0f51fa95258ac59 /drivers/rtc/rtc-gamecube.c
parent4ce1b97949cbf46e847722461386170e0f709c59 (diff)
parente5f12a398371280649ccc9d6eb0b97fd42a5df98 (diff)
Merge tag 'rtc-6.1' of git://git.kernel.org/pub/scm/linux/kernel/git/abelloni/linux
Pull RTC updates from Alexandre Belloni: "A great rework of the isl12022 driver makes up the bulk of the changes. There is also an important fix for CMOS and then the usual small fixes: - switch to devm_clk_get_enabled() where relevant - cmos: event handler registration fix - isl12022: code improvements" * tag 'rtc-6.1' of git://git.kernel.org/pub/scm/linux/kernel/git/abelloni/linux: rtc: rv3028: Fix codestyle errors rtc: cmos: Fix event handler registration ordering issue rtc: k3: Use devm_clk_get_enabled() helper rtc: jz4740: Use devm_clk_get_enabled() helper rtc: mpfs: Use devm_clk_get_enabled() helper rtc: ds1685: Fix spelling of function name in comment block rtc: isl12022: switch to using regmap API rtc: isl12022: drop redundant write to HR register rtc: isl12022: use dev_set_drvdata() instead of i2c_set_clientdata() rtc: isl12022: use %ptR rtc: isl12022: simplify some expressions rtc: isl12022: drop a dev_info() rtc: isl12022: specify range_min and range_max rtc: isl12022: stop using deprecated devm_rtc_device_register() rtc: stmp3xxx: Add failure handling for stmp3xxx_wdt_register() rtc: mxc: Use devm_clk_get_enabled() helper rtc: gamecube: Always reset HW_SRNPROT after read rtc: k3: detect SoC to determine erratum fix rtc: k3: wait until the unlock field is not zero rtc: mpfs: Remove printing of stray CR
Diffstat (limited to 'drivers/rtc/rtc-gamecube.c')
-rw-r--r--drivers/rtc/rtc-gamecube.c11
1 files changed, 5 insertions, 6 deletions
diff --git a/drivers/rtc/rtc-gamecube.c b/drivers/rtc/rtc-gamecube.c
index c2717bb52b2b..c828bc8e05b9 100644
--- a/drivers/rtc/rtc-gamecube.c
+++ b/drivers/rtc/rtc-gamecube.c
@@ -265,18 +265,17 @@ static int gamecube_rtc_read_offset_from_sram(struct priv *d)
* SRAM address as on previous consoles.
*/
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;
- }
/* Reset SRAM access to how it was before, our job here is done. */
if (old != 0x7bf)
iowrite32be(old, hw_srnprot);
+
iounmap(hw_srnprot);
- return 0;
+ if (ret)
+ pr_err("failed to get the RTC bias\n");
+
+ return ret;
}
static const struct regmap_range rtc_rd_ranges[] = {