[<prev] [next>] [day] [month] [year] [list]
Message-ID: <20150123114428.GA5450@devel.8.8.4.4>
Date: Fri, 23 Jan 2015 20:44:28 +0900
From: Daeseok Youn <daeseok.youn@...il.com>
To: lidza.louina@...il.com, markh@...pro.net
Cc: markh@...pro.net, daeseok.youn@...il.com,
gregkh@...uxfoundation.org, driverdev-devel@...uxdriverproject.org,
devel@...verdev.osuosl.org, linux-kernel@...r.kernel.org,
dan.carpenter@...cle.com, dcb314@...mail.com
Subject: [PATCH] staging: dgap: fix "if" statement that always evaluates to
true
cppcheck warning:
(warnning) Logical disjunction always evaluates to true
Reported-by: David Binderman <dcb314@...mail.com>
Signed-off-by: Daeseok Youn <daeseok.youn@...il.com>
---
drivers/staging/dgap/dgap.c | 8 ++++----
1 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/drivers/staging/dgap/dgap.c b/drivers/staging/dgap/dgap.c
index 518ab56..7184747 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;
}
--
1.7.1
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists