rtc: rv3032: fix error handling in rv3032_clkout_set_rate()
authorDan Carpenter <dan.carpenter@oracle.com>
Tue, 12 Oct 2021 10:10:28 +0000 (13:10 +0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 18 Nov 2021 18:17:01 +0000 (19:17 +0100)
commit1976e7b3c03395d8b8baf921315e5985a8de85f8
tree3d670f29ddbb72658f67075cfd2625d1aed858dc
parent84ea6245dc023f0919253790254e382f71ff4b88
rtc: rv3032: fix error handling in rv3032_clkout_set_rate()

[ Upstream commit c3336b8ac6091df60a5c1049a8c685d0b947cc61 ]

Do not call rv3032_exit_eerd() if the enter function fails but don't
forget to call the exit when the enter succeeds.

Fixes: 2eeaa532acca ("rtc: rv3032: Add a driver for Microcrystal RV-3032")
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Link: https://lore.kernel.org/r/20211012101028.GT2083@kadam
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/rtc/rtc-rv3032.c