staging: Use available error codes

An error code is stored in a variable, but 0 is returned instead.  Use the
variable instead of 0.

The semantic match that finds this problem is as follows:
(http://coccinelle.lip6.fr/)

// <smpl>
@r@
local idexpression x;
constant C;
@@

if (...) { ...
  x = -C
  ... when != x
(
  return <+...x...+>;
|
  return NULL;
|
  return;
|
* return ...;
)
}
// </smpl>

Signed-off-by: Julia Lawall <julia@diku.dk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
This commit is contained in:
Julia Lawall 2010-08-16 18:26:36 +02:00 committed by Greg Kroah-Hartman
parent bb59a4c539
commit 4d9db977f9
3 changed files with 3 additions and 3 deletions

View File

@ -512,7 +512,7 @@ exit:
mutex_unlock(&context->ctx_lock);
mutex_unlock(&disconnect_lock);
return 0;
return retval;
}
/**

View File

@ -1900,7 +1900,7 @@ int iwctl_siwgenie(struct net_device *dev,
}
out://not completely ...not necessary in wpa_supplicant 0.5.8
return 0;
return ret;
}
int iwctl_giwgenie(struct net_device *dev,

View File

@ -1719,7 +1719,7 @@ int iwctl_siwgenie(struct net_device *dev,
}
out://not completely ...not necessary in wpa_supplicant 0.5.8
return 0;
return ret;
}
int iwctl_giwgenie(struct net_device *dev,