summaryrefslogtreecommitdiff
path: root/drivers/staging/dgap
diff options
context:
space:
mode:
authorDaeseok Youn <daeseok.youn@gmail.com>2015-01-23 20:44:28 +0900
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2015-01-25 20:08:13 +0800
commitce5b615bc29273de705188e8a827dd7663069602 (patch)
tree72bdb55256df47a00530a523c1015198f03b8ab2 /drivers/staging/dgap
parented2084360d040a39be1ac9101b13c6fb0146f323 (diff)
staging: dgap: fix "if" statement that always evaluates to true
cppcheck warning: (warnning) Logical disjunction always evaluates to true Reported-by: David Binderman <dcb314@hotmail.com> Signed-off-by: Daeseok Youn <daeseok.youn@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging/dgap')
-rw-r--r--drivers/staging/dgap/dgap.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/staging/dgap/dgap.c b/drivers/staging/dgap/dgap.c
index 518ab567ca4e..7184747e0652 100644
--- a/drivers/staging/dgap/dgap.c
+++ b/drivers/staging/dgap/dgap.c
@@ -978,8 +978,8 @@ static int dgap_parsefile(char **in)
brd->u.board.conc1++;
conc_type = dgap_gettok(in);
- if (conc_type == 0 || conc_type != CX ||
- conc_type != EPC) {
+ if (conc_type == 0 || (conc_type != CX &&
+ conc_type != EPC)) {
pr_err("failed to set a type of concentratros");
return -1;
}
@@ -1019,8 +1019,8 @@ static int dgap_parsefile(char **in)
brd->u.board.module1++;
module_type = dgap_gettok(in);
- if (module_type == 0 || module_type != PORTS ||
- module_type != MODEM) {
+ if (module_type == 0 || (module_type != PORTS &&
+ module_type != MODEM)) {
pr_err("failed to set a type of module");
return -1;
}