Skip to content

Commit 71e6702

Browse files
Uwe Kleine-KönigLinus Walleij
authored andcommitted
pinctrl: single: Drop if block with always false condition
pcs_remove() is only called after pcs_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-3-u.kleine-koenig@pengutronix.de Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
1 parent 35df4b7 commit 71e6702

1 file changed

Lines changed: 0 additions & 3 deletions

File tree

drivers/pinctrl/pinctrl-single.c

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1929,9 +1929,6 @@ static int pcs_remove(struct platform_device *pdev)
19291929
{
19301930
struct pcs_device *pcs = platform_get_drvdata(pdev);
19311931

1932-
if (!pcs)
1933-
return 0;
1934-
19351932
pcs_free_resources(pcs);
19361933

19371934
return 0;

0 commit comments

Comments
 (0)