]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
pwm: sti: Avoid conditional gotos
authorThierry Reding <thierry.reding@gmail.com>
Wed, 11 Nov 2020 18:24:29 +0000 (19:24 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 20 Nov 2023 09:30:15 +0000 (10:30 +0100)
commit19e45307f71fb1650cf9a35f425cb7d37ced67a6
treedb844605ae6faa8f27cbe4fbdfa4f6267f7c4ed8
parentc4d5179e42b456abb3a0469d3d7a7db5b6294037
pwm: sti: Avoid conditional gotos

[ Upstream commit fd3ae02bb66f091e55f363d32eca7b4039977bf5 ]

Using gotos for conditional code complicates this code significantly.
Convert the code to simple conditional blocks to increase readability.

Suggested-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Acked-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Acked-by: Lee Jones <lee.jones@linaro.org>
Signed-off-by: Thierry Reding <thierry.reding@gmail.com>
Stable-dep-of: 2d6812b41e0d ("pwm: sti: Reduce number of allocations and drop usage of chip_data")
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/pwm/pwm-sti.c