mediatek: cast literal value to char
authorSven Wegener <sven.wegener@stealer.net>
Sat, 12 Jun 2021 19:56:21 +0000 (21:56 +0200)
committerDaniel Golle <daniel@makrotopia.org>
Sun, 11 Sep 2022 19:26:41 +0000 (20:26 +0100)
commite9a22ce2535c4a0faf83d5595304fe0e2c7bd1b2
tree7fe064f870f70d0a18a3e615b9223d7e14febda2
parentc4f9f9b44c82ffeacd9d3c00ba07171c35831337
mediatek: cast literal value to char

Or the comparison against a signed char is always true, because the
literal 0xaa is treated as an unsigned int, to which the signed char is
casted during comparison. 0xaa is above the positive values of a signed
char and negative signed char values result in values larger than 0xaa
when casted to unsigned int.

Signed-off-by: Sven Wegener <sven.wegener@stealer.net>
target/linux/mediatek/files/drivers/leds/leds-ubnt-ledbar.c