ASoC: wm8350: Handle error for wm8350_register_irq
authorJiasheng Jiang <jiasheng@iscas.ac.cn>
Fri, 4 Mar 2022 02:38:21 +0000 (10:38 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 20 Apr 2022 07:08:15 +0000 (09:08 +0200)
commitd1ab8ed66ee91f2d0361a0adddb1fe2d3dd63a91
treed1c257e1578a0471e89d74c5a5e1d24ca1008a29
parentf8b7b9a0594715ecfbe6f18db2328d992242654a
ASoC: wm8350: Handle error for wm8350_register_irq

[ Upstream commit db0350da8084ad549bca16cc0486c11cc70a1f9b ]

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 the same code.

Fixes: a6ba2b2dabb5 ("ASoC: Implement WM8350 headphone jack detection")
Signed-off-by: Jiasheng Jiang <jiasheng@iscas.ac.cn>
Acked-by: Charles Keepax <ckeepax@opensource.cirrus.com>
Link: https://lore.kernel.org/r/20220304023821.391936-1-jiasheng@iscas.ac.cn
Signed-off-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
sound/soc/codecs/wm8350.c