DORMANTno replies

[PATCH] ARM: pxa: ssp: Drop if with an always false condition

From: Uwe Kleine-König <hidden>
Date: 2021-07-27 07:43:05
Subsystem: arm port, the rest · Maintainers: Russell King, Linus Torvalds

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 <redacted>
---
 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


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help