Staging: rtl8192e: adjust error handling
authorHimangi Saraogi <himangi774@gmail.com>
Sat, 21 Jun 2014 15:09:51 +0000 (20:39 +0530)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 26 Jun 2014 23:59:06 +0000 (19:59 -0400)
commit49d74d7091364bcfdd3b35b1bda913351d543fed
tree16a153c864cef1c476865646200321640ff263a0
parenta90c6d530ea15b286feff464dde2e7d409091d8a
Staging: rtl8192e: adjust error handling

This patch removes a test in error handling code by adding a return
path.

The Coccinelle semantic match that found the problem is:

// <smpl>
@@
expression E,E1,E2;
@@

E = alloc_etherdev(...)
... when != E = E1
if (...) { ... free_netdev(E); ... return ...; }
... when != E = E2
(
  if (...)
   {
   ... when != free_netdev(E);
   return dev; }
|
* if (...)
   {
   ... when != free_netdev(E);
   return ...; }
|
register_netdev(E)
)

// </smpl>

Signed-off-by: Himangi Saraogi <himangi774@gmail.com>
Acked-by: Julia Lawall <julia.lawall@lip6.fr>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/rtl8192e/rtllib_module.c