]> www.infradead.org Git - users/dwmw2/linux.git/commit
i2c: qcom-geni: Simplify error handling in probe function
authorAndi Shyti <andi.shyti@kernel.org>
Fri, 27 Dec 2024 22:32:30 +0000 (23:32 +0100)
committerAndi Shyti <andi.shyti@kernel.org>
Tue, 7 Jan 2025 22:46:11 +0000 (23:46 +0100)
commit494fed6809585b8386072cf96ef2426e7a7c6326
treeb67a7af7ffb8d5ca1fbac36d2acbaab56d990d01
parentbfb3ddfdc5fb7904ba5c7870cfec9efabc9a4f83
i2c: qcom-geni: Simplify error handling in probe function

Avoid repeating the error handling pattern:

        geni_se_resources_off(&gi2c->se);
        clk_disable_unprepare(gi2c->core_clk);
        return;

Introduce a single 'goto' exit label for cleanup in case of
errors. While there are currently two distinct exit points, there
is no overlap in their handling, allowing both branches to
coexist cleanly.

Reviewed-by: Vladimir Zapolskiy <vladimir.zapolskiy@linaro.org>
Link: https://lore.kernel.org/r/20241227223230.462395-3-andi.shyti@kernel.org
Signed-off-by: Andi Shyti <andi.shyti@kernel.org>
drivers/i2c/busses/i2c-qcom-geni.c