mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-07 12:25:00 -04:00
usb: gadget: qdss: Fix overlapping comparison operators
The conditional check in qdss_enable_debug_inface_store() ensures that the user input is either a 1 or 0. However, the comparison check used has overlapping conditions, leading to a compile warning/error. Change the operators to check explicitly for 1 or 0 to avoid this. Change-Id: I582cd0ab56815b434818744f597f867fbf3abce2 Signed-off-by: Wesley Cheng <wcheng@codeaurora.org>
This commit is contained in:
parent
38b1718d28
commit
47ea755874
1 changed files with 1 additions and 1 deletions
|
|
@ -1013,7 +1013,7 @@ static ssize_t qdss_enable_debug_inface_store(struct config_item *item,
|
|||
return len;
|
||||
}
|
||||
|
||||
if (kstrtou8(page, 0, &stats) != 0 && (stats != 0 || stats != 1)) {
|
||||
if (kstrtou8(page, 0, &stats) != 0 && !(stats == 0 || stats == 1)) {
|
||||
pr_err("(%u)Wrong value. enter 0 to disable or 1 to enable.\n",
|
||||
stats);
|
||||
return len;
|
||||
|
|
|
|||
Loading…
Reference in a new issue