projects
/
openwrt
/
staging
/
blogic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
7f2d38e
)
hostap_cs: correct poor NULL checks in suspend/resume routines
author
John W. Linville
<
[email protected]
>
Wed, 2 Jul 2008 15:04:24 +0000
(11:04 -0400)
committer
John W. Linville
<
[email protected]
>
Mon, 7 Jul 2008 19:22:53 +0000
(15:22 -0400)
This corrects this kernel.org bug:
http://bugzilla.kernel.org/show_bug.cgi?id=9701
Signed-off-by: John W. Linville <
[email protected]
>
drivers/net/wireless/hostap/hostap_cs.c
patch
|
blob
|
history
diff --git
a/drivers/net/wireless/hostap/hostap_cs.c
b/drivers/net/wireless/hostap/hostap_cs.c
index 80039a0ae0276c6514978dd2d945bfc284520447..3b4e55cf33cd4a071b57a35144b4a3aa3b6883af 100644
(file)
--- 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)
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);