]> git.baikalelectronics.ru Git - kernel.git/commit
rtc: wm8350: Handle error for wm8350_register_irq
authorJiasheng Jiang <jiasheng@iscas.ac.cn>
Thu, 3 Mar 2022 08:50:30 +0000 (16:50 +0800)
committerAlexandre Belloni <alexandre.belloni@bootlin.com>
Wed, 23 Mar 2022 18:58:38 +0000 (19:58 +0100)
commita7e4a86aa29be14d896d7ee3b6fc953bb45c17d3
tree311dc56aa02b34ebd7c9b3094baf529fcae2b59e
parent2e7b9b27fa59af5d4de12407f56858742361be98
rtc: wm8350: Handle error for wm8350_register_irq

As the potential failure of the wm8350_register_irq(),
it should be better to check it and return error if fails.
Also, it need not free 'wm_rtc->rtc' since it will be freed
automatically.

Fixes: c6f91faa8ff9 ("rtc: rtc-wm8350: add support for WM8350 RTC")
Signed-off-by: Jiasheng Jiang <jiasheng@iscas.ac.cn>
Acked-by: Charles Keepax <ckeepax@opensource.cirrus.com>
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Link: https://lore.kernel.org/r/20220303085030.291793-1-jiasheng@iscas.ac.cn
drivers/rtc/rtc-wm8350.c