rtc: meson: remove useless rtc_nvmem_unregister call

Message ID 20190211103324.643-1-alexandre.belloni@bootlin.com
State Accepted
Headers show
Series
  • rtc: meson: remove useless rtc_nvmem_unregister call
Related show

Commit Message

Alexandre Belloni Feb. 11, 2019, 10:33 a.m.
rtc_nvmem_unregister() is called on rtc_device release so it is not
necessary to call it from the driver.

Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
---
 drivers/rtc/rtc-meson.c | 5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)

Comments

Martin Blumenstingl Feb. 17, 2019, 2:02 p.m. | #1
Hi Alexandre,

On Mon, Feb 11, 2019 at 11:33 AM Alexandre Belloni
<alexandre.belloni@bootlin.com> wrote:
>
> rtc_nvmem_unregister() is called on rtc_device release so it is not
> necessary to call it from the driver.
thank you for taking care of the linker-error!

> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Reviewed-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com>


Regards
Martin

Patch

diff --git a/drivers/rtc/rtc-meson.c b/drivers/rtc/rtc-meson.c
index 6fc4b09e7ebd..e08b981dfc21 100644
--- a/drivers/rtc/rtc-meson.c
+++ b/drivers/rtc/rtc-meson.c
@@ -373,13 +373,10 @@  static int meson_rtc_probe(struct platform_device *pdev)
 
 	ret = rtc_register_device(rtc->rtc);
 	if (ret)
-		goto out_unregister_nvmem;
+		goto out_disable_vdd;
 
 	return 0;
 
-out_unregister_nvmem:
-	rtc_nvmem_unregister(rtc->rtc);
-
 out_disable_vdd:
 	regulator_disable(rtc->vdd);
 	return ret;