[PATCH] ARM: pxa: ssp: Drop if with an always false condition
Uwe Kleine-König
u.kleine-koenig at pengutronix.de
Mon Jul 26 23:55:14 PDT 2021
The remove callback is only called after probe completed successfully.
In this case platform_set_drvdata() was called with a non-NULL argument
and so ssp is never NULL.
The motivation for this change is to get rid of non-zero return values
for remove callbacks as their only effect is to trigger a runtime
warning. See commit e5e1c2097881 ("driver core: platform: Emit a warning
if a remove callback returned non-zero") for further details.
Signed-off-by: Uwe Kleine-König <u.kleine-koenig at pengutronix.de>
---
arch/arm/plat-pxa/ssp.c | 2 --
1 file changed, 2 deletions(-)
diff --git a/arch/arm/plat-pxa/ssp.c b/arch/arm/plat-pxa/ssp.c
index 563440315acd..41f9fc50fca8 100644
--- a/arch/arm/plat-pxa/ssp.c
+++ b/arch/arm/plat-pxa/ssp.c
@@ -183,8 +183,6 @@ static int pxa_ssp_remove(struct platform_device *pdev)
struct ssp_device *ssp;
ssp = platform_get_drvdata(pdev);
- if (ssp == NULL)
- return -ENODEV;
mutex_lock(&ssp_lock);
list_del(&ssp->node);
--
2.30.2
More information about the linux-arm-kernel
mailing list