diff options
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/net/wireless/hostap/hostap_cs.c | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/drivers/net/wireless/hostap/hostap_cs.c b/drivers/net/wireless/hostap/hostap_cs.c index 80039a0ae027..3b4e55cf33cd 100644 --- a/drivers/net/wireless/hostap/hostap_cs.c +++ b/drivers/net/wireless/hostap/hostap_cs.c | |||
@@ -777,8 +777,10 @@ static int hostap_cs_suspend(struct pcmcia_device *link) | |||
777 | int dev_open = 0; | 777 | int dev_open = 0; |
778 | struct hostap_interface *iface = NULL; | 778 | struct hostap_interface *iface = NULL; |
779 | 779 | ||
780 | if (dev) | 780 | if (!dev) |
781 | iface = netdev_priv(dev); | 781 | return -ENODEV; |
782 | |||
783 | iface = netdev_priv(dev); | ||
782 | 784 | ||
783 | PDEBUG(DEBUG_EXTRA, "%s: CS_EVENT_PM_SUSPEND\n", dev_info); | 785 | PDEBUG(DEBUG_EXTRA, "%s: CS_EVENT_PM_SUSPEND\n", dev_info); |
784 | if (iface && iface->local) | 786 | if (iface && iface->local) |
@@ -798,8 +800,10 @@ static int hostap_cs_resume(struct pcmcia_device *link) | |||
798 | int dev_open = 0; | 800 | int dev_open = 0; |
799 | struct hostap_interface *iface = NULL; | 801 | struct hostap_interface *iface = NULL; |
800 | 802 | ||
801 | if (dev) | 803 | if (!dev) |
802 | iface = netdev_priv(dev); | 804 | return -ENODEV; |
805 | |||
806 | iface = netdev_priv(dev); | ||
803 | 807 | ||
804 | PDEBUG(DEBUG_EXTRA, "%s: CS_EVENT_PM_RESUME\n", dev_info); | 808 | PDEBUG(DEBUG_EXTRA, "%s: CS_EVENT_PM_RESUME\n", dev_info); |
805 | 809 | ||