diff options
author | Akinobu Mita <akinobu.mita@gmail.com> | 2007-05-27 23:26:31 +0900 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2007-05-29 11:16:35 -0400 |
commit | ef7ab2357ba09e8a795018640a87e93dfa043360 (patch) | |
tree | cb9c03ebeb933234f9966febd3421bc557c48562 | |
parent | a76193df7c7b60f9facb4090c5ec082e06582209 (diff) | |
download | op-kernel-dev-ef7ab2357ba09e8a795018640a87e93dfa043360.zip op-kernel-dev-ef7ab2357ba09e8a795018640a87e93dfa043360.tar.gz |
[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>
-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 e9cdc66..c308756 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); |