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>
This commit is contained in:
Daeseok Youn 2015-01-23 20:44:28 +09:00 коммит произвёл Greg Kroah-Hartman
Родитель ed2084360d
Коммит ce5b615bc2
1 изменённых файлов: 4 добавлений и 4 удалений

Просмотреть файл

@ -978,8 +978,8 @@ static int dgap_parsefile(char **in)
brd->u.board.conc1++; brd->u.board.conc1++;
conc_type = dgap_gettok(in); conc_type = dgap_gettok(in);
if (conc_type == 0 || conc_type != CX || if (conc_type == 0 || (conc_type != CX &&
conc_type != EPC) { conc_type != EPC)) {
pr_err("failed to set a type of concentratros"); pr_err("failed to set a type of concentratros");
return -1; return -1;
} }
@ -1019,8 +1019,8 @@ static int dgap_parsefile(char **in)
brd->u.board.module1++; brd->u.board.module1++;
module_type = dgap_gettok(in); module_type = dgap_gettok(in);
if (module_type == 0 || module_type != PORTS || if (module_type == 0 || (module_type != PORTS &&
module_type != MODEM) { module_type != MODEM)) {
pr_err("failed to set a type of module"); pr_err("failed to set a type of module");
return -1; return -1;
} }