Commit 4d9db977 authored by Julia Lawall's avatar Julia Lawall Committed by Greg Kroah-Hartman

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: default avatarJulia Lawall <julia@diku.dk>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
parent bb59a4c5
......@@ -512,7 +512,7 @@ static int ir_open(void *data)
mutex_unlock(&context->ctx_lock);
mutex_unlock(&disconnect_lock);
return 0;
return retval;
}
/**
......
......@@ -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,
......
......@@ -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,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment