* [PATCH] xtsonic: add missing platform_set_drvdata() in xtsonic_probe()
@ 2013-11-11 6:17 Wei Yongjun
2013-11-11 19:02 ` David Miller
0 siblings, 1 reply; 2+ messages in thread
From: Wei Yongjun @ 2013-11-11 6:17 UTC (permalink / raw)
To: davem, wfp5p, gregkh, michael.opdenacker, joe; +Cc: yongjun_wei, netdev
From: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
Add missing platform_set_drvdata() in xtsonic_probe(), otherwise
calling platform_get_drvdata() in xtsonic_device_remove() may
returns NULL.
Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
---
drivers/net/ethernet/natsemi/xtsonic.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/net/ethernet/natsemi/xtsonic.c b/drivers/net/ethernet/natsemi/xtsonic.c
index 4da172a..7007d21 100644
--- a/drivers/net/ethernet/natsemi/xtsonic.c
+++ b/drivers/net/ethernet/natsemi/xtsonic.c
@@ -264,6 +264,7 @@ int xtsonic_probe(struct platform_device *pdev)
lp = netdev_priv(dev);
lp->device = &pdev->dev;
+ platform_set_drvdata(pdev, dev);
SET_NETDEV_DEV(dev, &pdev->dev);
netdev_boot_setup_check(dev);
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] xtsonic: add missing platform_set_drvdata() in xtsonic_probe()
2013-11-11 6:17 [PATCH] xtsonic: add missing platform_set_drvdata() in xtsonic_probe() Wei Yongjun
@ 2013-11-11 19:02 ` David Miller
0 siblings, 0 replies; 2+ messages in thread
From: David Miller @ 2013-11-11 19:02 UTC (permalink / raw)
To: weiyj.lk; +Cc: wfp5p, gregkh, michael.opdenacker, joe, yongjun_wei, netdev
From: Wei Yongjun <weiyj.lk@gmail.com>
Date: Mon, 11 Nov 2013 14:17:17 +0800
> From: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
>
> Add missing platform_set_drvdata() in xtsonic_probe(), otherwise
> calling platform_get_drvdata() in xtsonic_device_remove() may
> returns NULL.
>
> Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
Applied.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2013-11-11 19:02 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-11-11 6:17 [PATCH] xtsonic: add missing platform_set_drvdata() in xtsonic_probe() Wei Yongjun
2013-11-11 19:02 ` David Miller
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.