power: supply: wm8350-power: Handle error for wm8350_register_irq
authorJiasheng Jiang <jiasheng@iscas.ac.cn>
Fri, 4 Mar 2022 01:57:51 +0000 (09:57 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 20 Apr 2022 07:08:18 +0000 (09:08 +0200)
commit8daeb3d5c46b41fa2baaaadbeeecb251bd7398a5
tree834daf0e943773566f1570594d0b86459c1a3aaa
parent820c1730b4723843c4881e2cbb462366d04021dc
power: supply: wm8350-power: Handle error for wm8350_register_irq

[ Upstream commit b0b14b5ba11bec56fad344a4a0b2e16449cc8b94 ]

As the potential failure of the wm8350_register_irq(),
it should be better to check it and return error if fails.
Also, use 'free_' in order to avoid same code.

Fixes: 14431aa0c5a4 ("power_supply: Add support for WM8350 PMU")
Signed-off-by: Jiasheng Jiang <jiasheng@iscas.ac.cn>
Acked-by: Charles Keepax <ckeepax@opensource.cirrus.com>
Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/power/supply/wm8350_power.c