diff options
author | Akinobu Mita <akinobu.mita@gmail.com> | 2007-05-27 10:26:31 -0400 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2007-05-29 11:16:35 -0400 |
commit | ef7ab2357ba09e8a795018640a87e93dfa043360 (patch) | |
tree | cb9c03ebeb933234f9966febd3421bc557c48562 /net/ieee80211/softmac/ieee80211softmac_module.c | |
parent | a76193df7c7b60f9facb4090c5ec082e06582209 (diff) |
[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/softmac/ieee80211softmac_module.c')
-rw-r--r-- | net/ieee80211/softmac/ieee80211softmac_module.c | 5 |
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) | |||
33 | struct ieee80211softmac_device *softmac; | 33 | struct ieee80211softmac_device *softmac; |
34 | struct net_device *dev; | 34 | struct net_device *dev; |
35 | 35 | ||
36 | dev = alloc_ieee80211(sizeof(struct ieee80211softmac_device) + sizeof_priv); | 36 | dev = alloc_ieee80211(sizeof(*softmac) + sizeof_priv); |
37 | if (!dev) | ||
38 | return NULL; | ||
39 | |||
37 | softmac = ieee80211_priv(dev); | 40 | softmac = ieee80211_priv(dev); |
38 | softmac->dev = dev; | 41 | softmac->dev = dev; |
39 | softmac->ieee = netdev_priv(dev); | 42 | softmac->ieee = netdev_priv(dev); |