netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] crypto: keembay-ocs-ecc: Drop if with an always false condition
@ 2022-07-15 10:30 Uwe Kleine-König
  2022-07-15 16:00 ` Florian Fainelli
  0 siblings, 1 reply; 4+ messages in thread
From: Uwe Kleine-König @ 2022-07-15 10:30 UTC (permalink / raw)
  To: Kalle Valo
  Cc: David S. Miller, Eric Dumazet, Jakub Kicinski, Paolo Abeni,
	linux-wireless, netdev, kernel

The remove callback is only called after probe completed successfully.
In this case platform_set_drvdata() was called with a non-NULL argument
(in wlcore_probe()) and so wl is never NULL.

This is a preparation for making platform remove callbacks return void.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
---
 drivers/net/wireless/ti/wl12xx/main.c | 3 ---
 1 file changed, 3 deletions(-)

diff --git a/drivers/net/wireless/ti/wl12xx/main.c b/drivers/net/wireless/ti/wl12xx/main.c
index c6da0cfb4afb..d06a2c419447 100644
--- a/drivers/net/wireless/ti/wl12xx/main.c
+++ b/drivers/net/wireless/ti/wl12xx/main.c
@@ -1924,13 +1924,10 @@ static int wl12xx_remove(struct platform_device *pdev)
 	struct wl1271 *wl = platform_get_drvdata(pdev);
 	struct wl12xx_priv *priv;
 
-	if (!wl)
-		goto out;
 	priv = wl->priv;
 
 	kfree(priv->rx_mem_addr);
 
-out:
 	return wlcore_remove(pdev);
 }
 

base-commit: f2906aa863381afb0015a9eb7fefad885d4e5a56
-- 
2.36.1


^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2022-07-27 12:52 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-07-15 10:30 [PATCH] crypto: keembay-ocs-ecc: Drop if with an always false condition Uwe Kleine-König
2022-07-15 16:00 ` Florian Fainelli
2022-07-15 22:46   ` [PATCH] wlcore/wl12xx: " Uwe Kleine-König
2022-07-27 12:52     ` wifi: wl12xx: " Kalle Valo

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).