]> git.baikalelectronics.ru Git - kernel.git/commit
rtc: omap: fix resource leak in registration error path
authorJohan Hovold <johan@kernel.org>
Wed, 4 Jul 2018 09:05:56 +0000 (11:05 +0200)
committerAlexandre Belloni <alexandre.belloni@bootlin.com>
Thu, 12 Jul 2018 18:31:18 +0000 (20:31 +0200)
commit4584dd10e4c092080df108ad79d26474cc1b3816
treeb42c957895447a9ebee31d986612c0db2d10df98
parenta8da1a0dc858e8d374392a081f0b6ec64dc37279
rtc: omap: fix resource leak in registration error path

Make sure to deregister the pin controller in case rtc registration
fails.

Fixes: 0b661c45dd6f ("rtc: omap: switch to rtc_register_device")
Cc: stable <stable@vger.kernel.org> # 4.14
Cc: Alexandre Belloni <alexandre.belloni@free-electrons.com>
Signed-off-by: Johan Hovold <johan@kernel.org>
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
drivers/rtc/rtc-omap.c