media: pvrusb2: fix the retry logic
As reported by this warning:
drivers/media/usb/pvrusb2/pvrusb2-encoder.c:263 pvr2_encoder_cmd() warn: continue to end of do { ... } while(0); loop
There's an issue at the retry logic there: the current logic is:
do {
if (need_to_retry)
continue;
some_code();
} while (0);
Well, that won't work, as continue will make it test for zero, and
abort the loop. So, change the loop to:
while (1) {
if (need_to_retry)
continue;
some_code();
break;
};
With seems to be what's actually expected there.
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
Showing
Please register or sign in to comment