summaryrefslogtreecommitdiffstats
path: root/net/ieee80211
diff options
context:
space:
mode:
authorAkinobu Mita <akinobu.mita@gmail.com>2007-05-27 23:26:31 +0900
committerJohn W. Linville <linville@tuxdriver.com>2007-05-29 11:16:35 -0400
commitef7ab2357ba09e8a795018640a87e93dfa043360 (patch)
treecb9c03ebeb933234f9966febd3421bc557c48562 /net/ieee80211
parenta76193df7c7b60f9facb4090c5ec082e06582209 (diff)
downloadlinux-ef7ab2357ba09e8a795018640a87e93dfa043360.tar.bz2
[PATCH] softmac: alloc_ieee80211() NULL check
This patch adds missing NULL check and trims a line longer than 80 columns. 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> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'net/ieee80211')
-rw-r--r--net/ieee80211/softmac/ieee80211softmac_module.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/net/ieee80211/softmac/ieee80211softmac_module.c b/net/ieee80211/softmac/ieee80211softmac_module.c
index e9cdc6615ddc..c308756c2f9d 100644
--- a/net/ieee80211/softmac/ieee80211softmac_module.c
+++ b/net/ieee80211/softmac/ieee80211softmac_module.c
@@ -33,7 +33,10 @@ struct net_device *alloc_ieee80211softmac(int sizeof_priv)
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);