From: Uwe Kleine-König Date: Mon, 9 Oct 2023 08:38:38 +0000 (+0200) Subject: pinctrl: single: Drop if block with always false condition X-Git-Url: https://www.infradead.org/git/?a=commitdiff_plain;h=71e670266780e66207b9b4ea6a20f335039bf975;p=linux.git 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 Link: https://lore.kernel.org/r/20231009083856.222030-3-u.kleine-koenig@pengutronix.de Signed-off-by: Linus Walleij --- diff --git a/drivers/pinctrl/pinctrl-single.c b/drivers/pinctrl/pinctrl-single.c index 68dc94da777a..de4dc7e67503 100644 --- a/drivers/pinctrl/pinctrl-single.c +++ b/drivers/pinctrl/pinctrl-single.c @@ -1929,9 +1929,6 @@ static int pcs_remove(struct platform_device *pdev) { struct pcs_device *pcs = platform_get_drvdata(pdev); - if (!pcs) - return 0; - pcs_free_resources(pcs); return 0;