public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/2] wifi: ray_cs: remove one redundant del_timer
@ 2023-03-13  6:58 Dongliang Mu
  2023-03-13  6:58 ` [PATCH 2/2] wifi: ray_cs: add sanity check on local->sram/rmem/amem Dongliang Mu
  2023-03-13  9:44 ` [PATCH 1/2] wifi: ray_cs: remove one redundant del_timer kernel test robot
  0 siblings, 2 replies; 3+ messages in thread
From: Dongliang Mu @ 2023-03-13  6:58 UTC (permalink / raw)
  To: Kalle Valo, David S. Miller, Eric Dumazet, Jakub Kicinski,
	Paolo Abeni
  Cc: Dongliang Mu, linux-wireless, netdev, linux-kernel

In ray_detach, it and its child function ray_release both call
del_timer(_sync) on the same timer.

Fix this by removing the del_timer_sync in the ray_detach, and revising
the del_timer to del_timer_sync.

Signed-off-by: Dongliang Mu <dzm91@hust.edu.cn>
---
 drivers/net/wireless/ray_cs.c | 5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)

diff --git a/drivers/net/wireless/ray_cs.c b/drivers/net/wireless/ray_cs.c
index 1f57a0055bbd..785a5be72b2b 100644
--- a/drivers/net/wireless/ray_cs.c
+++ b/drivers/net/wireless/ray_cs.c
@@ -331,9 +331,6 @@ static void ray_detach(struct pcmcia_device *link)
 
 	ray_release(link);
 
-	local = netdev_priv(dev);
-	del_timer_sync(&local->timer);
-
 	if (link->priv) {
 		unregister_netdev(dev);
 		free_netdev(dev);
@@ -734,7 +731,7 @@ static void ray_release(struct pcmcia_device *link)
 
 	dev_dbg(&link->dev, "ray_release\n");
 
-	del_timer(&local->timer);
+	del_timer_sync(&local->timer);
 
 	iounmap(local->sram);
 	iounmap(local->rmem);
-- 
2.39.2


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

end of thread, other threads:[~2023-03-13  9:45 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-03-13  6:58 [PATCH 1/2] wifi: ray_cs: remove one redundant del_timer Dongliang Mu
2023-03-13  6:58 ` [PATCH 2/2] wifi: ray_cs: add sanity check on local->sram/rmem/amem Dongliang Mu
2023-03-13  9:44 ` [PATCH 1/2] wifi: ray_cs: remove one redundant del_timer kernel test robot

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox