b43: check for allocation failures
Add some error handling if the allocation fails.
Signed-off-by: Dan Carpenter <error27@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
diff --git a/drivers/net/wireless/b43/main.c b/drivers/net/wireless/b43/main.c
index 1d8d983..7aed9a0 100644
--- a/drivers/net/wireless/b43/main.c
+++ b/drivers/net/wireless/b43/main.c
@@ -5025,6 +5025,8 @@
int first = 0;
dev = b43_bus_dev_ssb_init(sdev);
+ if (!dev)
+ return -ENOMEM;
wl = ssb_get_devtypedata(sdev);
if (!wl) {