rtc: pl031: fix resource leak in pl031_probe
authorZheng Liang <zhengliang6@huawei.com>
Thu, 12 Nov 2020 09:31:39 +0000 (17:31 +0800)
committerAlexandre Belloni <alexandre.belloni@bootlin.com>
Sat, 14 Nov 2020 22:42:29 +0000 (23:42 +0100)
commit1eab0fea2514b269e384c117f5b5772b882761f0
tree6c0af0417dc3bddeac2334c52e446fd16df0a81e
parentbc06cfc1c41e3b60b159132e5bba4c059a2e7f83
rtc: pl031: fix resource leak in pl031_probe

When devm_rtc_allocate_device is failed in pl031_probe, it should release
mem regions with device.

Reported-by: Hulk Robot <hulkci@huawei.com>
Signed-off-by: Zheng Liang <zhengliang6@huawei.com>
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Acked-by: Linus Walleij <linus.walleij@linaro.org>
Link: https://lore.kernel.org/r/20201112093139.32566-1-zhengliang6@huawei.com
drivers/rtc/rtc-pl031.c