summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJulia Lawall <julia@diku.dk>2010-08-16 18:26:36 +0200
committerGreg Kroah-Hartman <gregkh@suse.de>2010-08-31 15:05:12 -0700
commit4d9db977f9ac9b15f916888978026025c6cf9563 (patch)
treec200321e405a3a4a26bcd0d3e8c1f88b71329438
parentbb59a4c539140592723e806e852ee171da0eb3eb (diff)
downloadlinux-3.10-4d9db977f9ac9b15f916888978026025c6cf9563.tar.gz
linux-3.10-4d9db977f9ac9b15f916888978026025c6cf9563.tar.bz2
linux-3.10-4d9db977f9ac9b15f916888978026025c6cf9563.zip
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>
-rw-r--r--drivers/staging/lirc/lirc_sasem.c2
-rw-r--r--drivers/staging/vt6655/iwctl.c2
-rw-r--r--drivers/staging/vt6656/iwctl.c2
3 files changed, 3 insertions, 3 deletions
diff --git a/drivers/staging/lirc/lirc_sasem.c b/drivers/staging/lirc/lirc_sasem.c
index 73166c3f581..856487eecd2 100644
--- a/drivers/staging/lirc/lirc_sasem.c
+++ b/drivers/staging/lirc/lirc_sasem.c
@@ -512,7 +512,7 @@ exit:
mutex_unlock(&context->ctx_lock);
mutex_unlock(&disconnect_lock);
- return 0;
+ return retval;
}
/**
diff --git a/drivers/staging/vt6655/iwctl.c b/drivers/staging/vt6655/iwctl.c
index 43227617aab..4009c0b5bb2 100644
--- a/drivers/staging/vt6655/iwctl.c
+++ b/drivers/staging/vt6655/iwctl.c
@@ -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,
diff --git a/drivers/staging/vt6656/iwctl.c b/drivers/staging/vt6656/iwctl.c
index 9c855f0ffce..0004be8e395 100644
--- a/drivers/staging/vt6656/iwctl.c
+++ b/drivers/staging/vt6656/iwctl.c
@@ -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,