public inbox for linux-staging@lists.linux.dev
 help / color / mirror / Atom feed
* [PATCH -next] staging: ks7010: remove unnecessary sdio_set_drvdata() function
@ 2023-08-11  9:17 Yang Yingliang
  2023-08-11 20:38 ` Greg KH
  0 siblings, 1 reply; 2+ messages in thread
From: Yang Yingliang @ 2023-08-11  9:17 UTC (permalink / raw)
  To: linux-staging; +Cc: gregkh, yangyingliang

The driver data will be cleared in device_unbind_cleanup() in driver
core code. So the sdio_set_drvdata(..., NULL) called in remove and
error path in probe can be removed.

Signed-off-by: Yang Yingliang <yangyingliang@huawei.com>
---
 drivers/staging/ks7010/ks7010_sdio.c | 2 --
 1 file changed, 2 deletions(-)

diff --git a/drivers/staging/ks7010/ks7010_sdio.c b/drivers/staging/ks7010/ks7010_sdio.c
index 9fb118e77a1f..74a0ad787f4a 100644
--- a/drivers/staging/ks7010/ks7010_sdio.c
+++ b/drivers/staging/ks7010/ks7010_sdio.c
@@ -1044,7 +1044,6 @@ static int ks7010_sdio_probe(struct sdio_func *func,
 	sdio_disable_func(func);
  err_free_card:
 	sdio_release_host(func);
-	sdio_set_drvdata(func, NULL);
 	kfree(card);
 
 	return -ENODEV;
@@ -1118,7 +1117,6 @@ static void ks7010_sdio_remove(struct sdio_func *func)
 	sdio_disable_func(func);
 	sdio_release_host(func);
 err_free_card:
-	sdio_set_drvdata(func, NULL);
 	kfree(card);
 }
 
-- 
2.25.1


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

end of thread, other threads:[~2023-08-11 20:38 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-08-11  9:17 [PATCH -next] staging: ks7010: remove unnecessary sdio_set_drvdata() function Yang Yingliang
2023-08-11 20:38 ` Greg KH

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