pinctrl: single: Move test PCS_HAS_PINCONF in pcs_parse_bits_in_pinctrl_entry() to...
authorZhen Lei <thunder.leizhen@huawei.com>
Thu, 22 Jul 2021 03:39:30 +0000 (11:39 +0800)
committerLinus Walleij <linus.walleij@linaro.org>
Tue, 10 Aug 2021 12:42:56 +0000 (14:42 +0200)
commit2ac48d0d486d9dbdcca2e6d945031541d880df3b
tree59d4d1f46227acf2d6e61a3e592e7c1ff84171ac
parentd789a490d32fdf0465275e3607f8a3bc87d3f3ba
pinctrl: single: Move test PCS_HAS_PINCONF in pcs_parse_bits_in_pinctrl_entry() to the beginning

The value of pcs->flags is not overwritten in function
pcs_parse_bits_in_pinctrl_entry() and its subfunctions, so moving this
check to the beginning of the function eliminates unnecessary rollback
operations.

Signed-off-by: Zhen Lei <thunder.leizhen@huawei.com>
Reviewed-by: Tony Lindgren <tony@atomide.com>
Link: https://lore.kernel.org/r/20210722033930.4034-3-thunder.leizhen@huawei.com
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
drivers/pinctrl/pinctrl-single.c