]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
i2c: ali15x3: Fix an error handling path in ali15x3_probe()
authorChristophe JAILLET <christophe.jaillet@wanadoo.fr>
Mon, 3 Mar 2025 19:58:06 +0000 (20:58 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 10 Apr 2025 12:31:53 +0000 (14:31 +0200)
commit449aaab1338bf21b30a982f66e1d72076091345e
tree9131833c1f51772b7d6db295f1d948084c007eea
parent35092c242e10cad3ba71dac25e5ff656d3b4b97f
i2c: ali15x3: Fix an error handling path in ali15x3_probe()

[ Upstream commit 6e55caaf30c88209d097e575a169b1dface1ab69 ]

If i2c_add_adapter() fails, the request_region() call in ali15x3_setup()
must be undone by a corresponding release_region() call, as done in the
remove function.

Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2")
Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
Signed-off-by: Andi Shyti <andi.shyti@kernel.org>
Link: https://lore.kernel.org/r/9b2090cbcc02659f425188ea05f2e02745c4e67b.1741031878.git.christophe.jaillet@wanadoo.fr
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/i2c/busses/i2c-ali15x3.c