Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 47ea7558 authored by Wesley Cheng's avatar Wesley Cheng Committed by Gerrit - the friendly Code Review server
Browse files

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: default avatarWesley Cheng <wcheng@codeaurora.org>
parent 38b1718d
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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;