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

[ Upstream commit 9b5463f349d019a261f1e80803447efca3126151 ]

If i2c_add_adapter() fails, the request_region() call in ali1535_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/0daf63d7a2ce74c02e2664ba805bbfadab7d25e5.1741031571.git.christophe.jaillet@wanadoo.fr
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/i2c/busses/i2c-ali1535.c