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)
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>

No differences found