From 81b7c173e3609ed77a9f9909406aefa122801a38 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Uwe=20Kleine-K=C3=B6nig?= Date: Wed, 5 May 2021 18:19:08 +0200 Subject: [PATCH] pwm: pxa: Drop if with an always false condition MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit The .remove() function is only called after .probe() returned successfully. In this case platform_set_drvdata() was called with a non-NULL argument and so platfrom_get_drvdata() returns the same non-NULL value. Signed-off-by: Uwe Kleine-König Signed-off-by: Thierry Reding --- drivers/pwm/pwm-pxa.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/drivers/pwm/pwm-pxa.c b/drivers/pwm/pwm-pxa.c index cfb683827d32e..31752640dcf73 100644 --- a/drivers/pwm/pwm-pxa.c +++ b/drivers/pwm/pwm-pxa.c @@ -210,8 +210,6 @@ static int pwm_remove(struct platform_device *pdev) struct pxa_pwm_chip *chip; chip = platform_get_drvdata(pdev); - if (chip == NULL) - return -ENODEV; return pwmchip_remove(&chip->chip); } -- 2.30.2