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)
committerSebastian Reichel <sre@kernel.org>
Fri, 4 Mar 2022 21:20:32 +0000 (22:20 +0100)
commitb0b14b5ba11bec56fad344a4a0b2e16449cc8b94
tree48b12727405174430324301f849c66d72205a97e
parentc8aee3f41cb84a9ac3b6b5ba2e92cda6cf50d0a0
power: supply: wm8350-power: 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, 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>
drivers/power/supply/wm8350_power.c