media: dvb-frontends: m88ds3103: Fix a memory leak in an error handling path of m88ds...
authorChristophe JAILLET <christophe.jaillet@wanadoo.fr>
Mon, 30 Oct 2023 07:20:26 +0000 (08:20 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 25 Jan 2024 23:35:35 +0000 (15:35 -0800)
commitee3e64d1dac68105fbdfff8f317c118afa201938
treef63a1f6a96ed4503e29752422a7cf363ee736464
parentde28d63ad35c7c58cb2e707db069a95e068c276b
media: dvb-frontends: m88ds3103: Fix a memory leak in an error handling path of m88ds3103_probe()

[ Upstream commit 5b2f885e2f6f482d05c23f04c8240f7b4fc5bdb5 ]

If an error occurs after a successful i2c_mux_add_adapter(), then
i2c_mux_del_adapters() should be called to free some resources, as
already done in the remove function.

Fixes: e6089feca460 ("media: m88ds3103: Add support for ds3103b demod")
Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/media/dvb-frontends/m88ds3103.c