diff options
author | Kulikov Vasiliy <segooon@gmail.com> | 2010-07-30 15:09:02 +0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2010-08-02 18:23:45 -0700 |
commit | 0ebdd466f4682608a6b90ef018d36b57925f4d64 (patch) | |
tree | 424cc80eaee7e1d8ad1efa635a071c7ed4d8642c /drivers/staging/rtl8192su | |
parent | 10f3f5b7f6d1faca62c746d1a4e85f7afba4d7d0 (diff) | |
download | blackbird-op-linux-0ebdd466f4682608a6b90ef018d36b57925f4d64.tar.gz blackbird-op-linux-0ebdd466f4682608a6b90ef018d36b57925f4d64.zip |
staging: rtl8192su: check whether requests succeeded
rtl8192_usb_probe() does not check alloc_ieee80211() and
register_netdev() return values for errors.
Signed-off-by: Kulikov Vasiliy <segooon@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/staging/rtl8192su')
-rw-r--r-- | drivers/staging/rtl8192su/r8192U_core.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/drivers/staging/rtl8192su/r8192U_core.c b/drivers/staging/rtl8192su/r8192U_core.c index 90ab1aa5f8a0..fcd05304b470 100644 --- a/drivers/staging/rtl8192su/r8192U_core.c +++ b/drivers/staging/rtl8192su/r8192U_core.c @@ -7380,6 +7380,8 @@ static int __devinit rtl8192_usb_probe(struct usb_interface *intf, RT_TRACE(COMP_INIT, "Oops: i'm coming\n"); dev = alloc_ieee80211(sizeof(struct r8192_priv)); + if (dev == NULL) + return -ENOMEM; usb_set_intfdata(intf, dev); SET_NETDEV_DEV(dev, &intf->dev); @@ -7417,7 +7419,8 @@ static int __devinit rtl8192_usb_probe(struct usb_interface *intf, netif_carrier_off(dev); netif_stop_queue(dev); - register_netdev(dev); + if (register_netdev(dev)) + goto fail; RT_TRACE(COMP_INIT, "dev name=======> %s\n",dev->name); rtl8192_proc_init_one(dev); |