diff options
author | Ralph Loader | 2011-01-21 07:27:53 +0100 |
---|---|---|
committer | Greg Kroah-Hartman | 2011-01-21 21:35:50 +0100 |
commit | 3ec6080e2e5be05e6f7fbbe5ab20b0eab84e166b (patch) | |
tree | 02cfd126f50296adb378fae12617bcc1fa410494 /drivers/staging/cxt1e1 | |
parent | staging: cs5535_gpio: check put_user() return code (diff) | |
download | kernel-qcow2-linux-3ec6080e2e5be05e6f7fbbe5ab20b0eab84e166b.tar.gz kernel-qcow2-linux-3ec6080e2e5be05e6f7fbbe5ab20b0eab84e166b.tar.xz kernel-qcow2-linux-3ec6080e2e5be05e6f7fbbe5ab20b0eab84e166b.zip |
staging: Fix some incorrect use of positive error codes.
Use -E... instead of just E... in a few places where negative error
codes are expected by a functions callers. These were found by grepping
with coccinelle & then inspecting by hand to determine which were bugs.
The staging/cxt1e1 driver appears to intentionally use positive E...
error codes in some places, and negative -E... error codes in others,
making it hard to know which is intended where - very likely I missed
some problems in that driver.
Signed-off-by: Ralph Loader <suckfish@ihug.co.nz>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/staging/cxt1e1')
-rw-r--r-- | drivers/staging/cxt1e1/linux.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/staging/cxt1e1/linux.c b/drivers/staging/cxt1e1/linux.c index 0f78f8962751..9ced08f253b3 100644 --- a/drivers/staging/cxt1e1/linux.c +++ b/drivers/staging/cxt1e1/linux.c @@ -548,7 +548,7 @@ do_set_port (struct net_device * ndev, void *data) return -EINVAL; /* get card info */ if (pp.portnum >= ci->max_port) /* sanity check */ - return ENXIO; + return -ENXIO; memcpy (&ci->port[pp.portnum].p, &pp, sizeof (struct sbecom_port_param)); return mkret (c4_set_port (ci, pp.portnum)); |