提交 fcee7a01 编写于 作者: J John W. Linville

hostap_cs: correct poor NULL checks in suspend/resume routines

This corrects this kernel.org bug:

	http://bugzilla.kernel.org/show_bug.cgi?id=9701Signed-off-by: NJohn W. Linville <linville@tuxdriver.com>
上级 7f2d38eb
......@@ -777,8 +777,10 @@ static int hostap_cs_suspend(struct pcmcia_device *link)
int dev_open = 0;
struct hostap_interface *iface = NULL;
if (dev)
iface = netdev_priv(dev);
if (!dev)
return -ENODEV;
iface = netdev_priv(dev);
PDEBUG(DEBUG_EXTRA, "%s: CS_EVENT_PM_SUSPEND\n", dev_info);
if (iface && iface->local)
......@@ -798,8 +800,10 @@ static int hostap_cs_resume(struct pcmcia_device *link)
int dev_open = 0;
struct hostap_interface *iface = NULL;
if (dev)
iface = netdev_priv(dev);
if (!dev)
return -ENODEV;
iface = netdev_priv(dev);
PDEBUG(DEBUG_EXTRA, "%s: CS_EVENT_PM_RESUME\n", dev_info);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册