]> git.proxmox.com Git - mirror_ubuntu-bionic-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)
committerJuerg Haefliger <juergh@canonical.com>
Wed, 24 Jul 2019 01:46:08 +0000 (19:46 -0600)
commita8b156699c449354fdbc9a1a53868aa93de5011a
tree52394a53cf54ea78a1ebc35b8281859a7018e2a2
parent6234839cfd0585eee4c7d110a8fbdfe13e09455b
rtc: omap: fix resource leak in registration error path

BugLink: https://bugs.launchpad.net/bugs/1835972
commit 551757eb052986ec81cebcc6301cc1c4f8dca938 upstream.

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

Fixes: 57072758623f ("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>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
Signed-off-by: Kleber Sacilotto de Souza <kleber.souza@canonical.com>
drivers/rtc/rtc-omap.c