aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/staging
diff options
context:
space:
mode:
authorKulikov Vasiliy <segooon@gmail.com>2010-07-30 07:09:02 -0400
committerGreg Kroah-Hartman <gregkh@suse.de>2010-08-02 21:23:45 -0400
commit0ebdd466f4682608a6b90ef018d36b57925f4d64 (patch)
tree424cc80eaee7e1d8ad1efa635a071c7ed4d8642c /drivers/staging
parent10f3f5b7f6d1faca62c746d1a4e85f7afba4d7d0 (diff)
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')
-rw-r--r--drivers/staging/rtl8192su/r8192U_core.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/drivers/staging/rtl8192su/r8192U_core.c b/drivers/staging/rtl8192su/r8192U_core.c
index 90ab1aa5f8a..fcd05304b47 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,
7380 RT_TRACE(COMP_INIT, "Oops: i'm coming\n"); 7380 RT_TRACE(COMP_INIT, "Oops: i'm coming\n");
7381 7381
7382 dev = alloc_ieee80211(sizeof(struct r8192_priv)); 7382 dev = alloc_ieee80211(sizeof(struct r8192_priv));
7383 if (dev == NULL)
7384 return -ENOMEM;
7383 7385
7384 usb_set_intfdata(intf, dev); 7386 usb_set_intfdata(intf, dev);
7385 SET_NETDEV_DEV(dev, &intf->dev); 7387 SET_NETDEV_DEV(dev, &intf->dev);
@@ -7417,7 +7419,8 @@ static int __devinit rtl8192_usb_probe(struct usb_interface *intf,
7417 netif_carrier_off(dev); 7419 netif_carrier_off(dev);
7418 netif_stop_queue(dev); 7420 netif_stop_queue(dev);
7419 7421
7420 register_netdev(dev); 7422 if (register_netdev(dev))
7423 goto fail;
7421 RT_TRACE(COMP_INIT, "dev name=======> %s\n",dev->name); 7424 RT_TRACE(COMP_INIT, "dev name=======> %s\n",dev->name);
7422 rtl8192_proc_init_one(dev); 7425 rtl8192_proc_init_one(dev);
7423 7426