]> pilppa.com Git - linux-2.6-omap-h63xx.git/commitdiff
[PATCH] softmac: alloc_ieee80211() NULL check
authorAkinobu Mita <akinobu.mita@gmail.com>
Sun, 27 May 2007 14:26:31 +0000 (23:26 +0900)
committerJohn W. Linville <linville@tuxdriver.com>
Tue, 29 May 2007 15:16:35 +0000 (11:16 -0400)
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>
net/ieee80211/softmac/ieee80211softmac_module.c

index e9cdc6615ddc7483447d34907205c907a39782a0..c308756c2f9dae7edb6f65d90e98dfbe41fded7a 100644 (file)
@@ -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);