Skip to content

Commit 9883a4d

Browse files
committed
media: dvb_frontend: don't play tricks with underflow values
fepriv->auto_sub_step is unsigned. Setting it to -1 is just a trick to avoid calling continue, as reported by Coverity. It relies to have this code just afterwards: if (!ready) fepriv->auto_sub_step++; Simplify the code by simply setting it to zero and use continue to return to the while loop. Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2") Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
1 parent 972e63e commit 9883a4d

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

drivers/media/dvb-core/dvb_frontend.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -443,8 +443,8 @@ static int dvb_frontend_swzigzag_autotune(struct dvb_frontend *fe, int check_wra
443443

444444
default:
445445
fepriv->auto_step++;
446-
fepriv->auto_sub_step = -1; /* it'll be incremented to 0 in a moment */
447-
break;
446+
fepriv->auto_sub_step = 0;
447+
continue;
448448
}
449449

450450
if (!ready) fepriv->auto_sub_step++;

0 commit comments

Comments
 (0)