pinctrl: ti: ti-iodelay: Drop if block with always false condition
authorUwe Kleine-König <u.kleine-koenig@pengutronix.de>
Mon, 9 Oct 2023 08:38:39 +0000 (10:38 +0200)
committerLinus Walleij <linus.walleij@linaro.org>
Tue, 10 Oct 2023 13:36:44 +0000 (15:36 +0200)
ti_iodelay_remove() is only called after ti_iodelay_probe() completed
successfully. In this case platform_set_drvdata() was called with a
non-NULL argument and so platform_get_drvdata() won't return NULL.

Simplify by removing the if block with the always false condition.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Link: https://lore.kernel.org/r/20231009083856.222030-4-u.kleine-koenig@pengutronix.de
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
drivers/pinctrl/ti/pinctrl-ti-iodelay.c

index c1477f65783933f29161a4bf57d5f8986d0be9f3..f3a2735620955deaa732e7702dee7ec92366fa81 100644 (file)
@@ -903,9 +903,6 @@ static int ti_iodelay_remove(struct platform_device *pdev)
 {
        struct ti_iodelay_device *iod = platform_get_drvdata(pdev);
 
-       if (!iod)
-               return 0;
-
        if (iod->pctl)
                pinctrl_unregister(iod->pctl);