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

Commit f14a2972 authored by Roel Kluin's avatar Roel Kluin Committed by Mauro Carvalho Chehab
Browse files

V4L/DVB (13241): Cleanup redundant tests on unsigned



The variables are unsigned so the test `>= 0' is always true,
the `< 0' test always fails. In these cases the other part of
the test catches wrapped values.

Signed-off-by: default avatarRoel Kluin <roel.kluin@gmail.com>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@redhat.com>
parent 311c70e1
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -463,7 +463,7 @@ static int tda9887_set_insmod(struct dvb_frontend *fe)
			buf[1] &= ~cQSS;
	}

	if (adjust >= 0x00 && adjust < 0x20) {
	if (adjust < 0x20) {
		buf[2] &= ~cTopMask;
		buf[2] |= adjust;
	}
+1 −1
Original line number Diff line number Diff line
@@ -1373,7 +1373,7 @@ static int GetGpioPinParams(u32 PinNum, u32 *pTranslatedPinNum,

	*pGroupCfg = 1;

	if (PinNum >= 0 && PinNum <= 1)	{
	if (PinNum <= 1)	{
		*pTranslatedPinNum = 0;
		*pGroupNum = 9;
		*pGroupCfg = 2;
+1 −1
Original line number Diff line number Diff line
@@ -299,7 +299,7 @@ static int bt819_s_routing(struct v4l2_subdev *sd,

	v4l2_dbg(1, debug, sd, "set input %x\n", input);

	if (input < 0 || input > 7)
	if (input > 7)
		return -EINVAL;

	if (sd->v4l2_dev == NULL || sd->v4l2_dev->notify == NULL)
+1 −1
Original line number Diff line number Diff line
@@ -251,7 +251,7 @@ static int vidioc_s_input(struct file *file, void *fh, unsigned int input)

	DEB_EE(("VIDIOC_S_INPUT %d.\n", input));

	if (input < 0 || input >= HEXIUM_INPUTS)
	if (input >= HEXIUM_INPUTS)
		return -EINVAL;

	hexium->cur_input = input;
+1 −1
Original line number Diff line number Diff line
@@ -350,7 +350,7 @@ static int vidioc_s_input(struct file *file, void *fh, unsigned int input)
	struct saa7146_dev *dev = ((struct saa7146_fh *)fh)->dev;
	struct hexium *hexium = (struct hexium *) dev->ext_priv;

	if (input < 0 || input >= HEXIUM_INPUTS)
	if (input >= HEXIUM_INPUTS)
		return -EINVAL;

	hexium->cur_input = input;
Loading