* [PATCH] softmac: alloc_ieee80211() NULL check
@ 2007-05-27 14:26 Akinobu Mita
0 siblings, 0 replies; only message in thread
From: Akinobu Mita @ 2007-05-27 14:26 UTC (permalink / raw)
To: linux-wireless; +Cc: John W. Linville, Johannes Berg, Joe Jezak, Daniel Drake
This patch adds missing NULL check and trims a line longer than 80 columns.
Cc: John W. Linville <linville@tuxdriver.com>
Cc: Johannes Berg <johannes@sipsolutions.net>
Cc: Joe Jezak <josejx@gentoo.org>
Cc: Daniel Drake <dsd@gentoo.org>
Signed-off-by: Akinobu Mita <akinobu.mita@gmail.com>
---
net/ieee80211/softmac/ieee80211softmac_module.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
Index: 2.6-mm/net/ieee80211/softmac/ieee80211softmac_module.c
===================================================================
--- 2.6-mm.orig/net/ieee80211/softmac/ieee80211softmac_module.c
+++ 2.6-mm/net/ieee80211/softmac/ieee80211softmac_module.c
@@ -33,7 +33,10 @@ struct net_device *alloc_ieee80211softma
struct ieee80211softmac_device *softmac;
struct net_device *dev;
- dev = alloc_ieee80211(sizeof(struct ieee80211softmac_device) + sizeof_priv);
+ dev = alloc_ieee80211(sizeof(*softmac) + sizeof_priv);
+ if (!dev)
+ return NULL;
+
softmac = ieee80211_priv(dev);
softmac->dev = dev;
softmac->ieee = netdev_priv(dev);
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2007-05-27 14:34 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-05-27 14:26 [PATCH] softmac: alloc_ieee80211() NULL check Akinobu Mita
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox