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

Commit bc35f73a authored by Christos Gkekas's avatar Christos Gkekas Committed by Jiri Kosina
Browse files

HID: wacom: Remove comparison of u8 mode with zero and simplify.



Variable mode in method wacom_show_remote_mode() is defined as u8, thus
statement (mode >= 0) is always true and should be removed, simplifying
the logic.

Signed-off-by: default avatarChristos Gkekas <chris.gekas@gmail.com>
Reviewed-by: default avatarBenjamin Tissoires <benjamin.tissoires@redhat.com>
Signed-off-by: default avatarJiri Kosina <jkosina@suse.cz>
parent a91ab911
Loading
Loading
Loading
Loading
+1 −4
Original line number Diff line number Diff line
@@ -1671,10 +1671,7 @@ static ssize_t wacom_show_remote_mode(struct kobject *kobj,
	u8 mode;

	mode = wacom->led.groups[index].select;
	if (mode >= 0 && mode < 3)
		return snprintf(buf, PAGE_SIZE, "%d\n", mode);
	else
		return snprintf(buf, PAGE_SIZE, "%d\n", -1);
	return sprintf(buf, "%d\n", mode < 3 ? mode : -1);
}

#define DEVICE_EKR_ATTR_GROUP(SET_ID)					\