Skip to contentSkip to conversation

tvp5150: signedness bug in tvp5150_selmux()

media Dan Carpenter 1 participant 1 message Jul 12, 2012

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

tvp5150_read() returns negative error codes so this needs to be an int for the error handling to work.

drivers/media/video/tvp5150.c +1 -1
index 0d897cb..a751b6c 100644
@@ -257,7 +257,7 @@ static inline void tvp5150_selmux(struct v4l2_subdev *sd)
 	int opmode = 0;
 	struct tvp5150 *decoder = to_tvp5150(sd);
 	int input = 0;
-	unsigned char val;
+	int val;
 
 	if ((decoder->output & TVP5150_BLACK_SCREEN) || !decoder->enable)
 		input = 8;