summaryrefslogtreecommitdiff
path: root/drivers/media/usb
diff options
context:
space:
mode:
authorColin Ian King <colin.king@canonical.com>2017-05-07 21:33:05 +0300
committerMauro Carvalho Chehab <mchehab@s-opensource.com>2017-06-07 19:52:41 +0300
commit47b586f66a9e78c91586b9c363603a52c75840d7 (patch)
treec9e405e88240f90cb9049194d52fff91127d42a9 /drivers/media/usb
parent97adc2b39e91b9037ef0a14d1e996acd09471c4b (diff)
downloadlinux-47b586f66a9e78c91586b9c363603a52c75840d7.tar.xz
[media] pvrusb2: remove redundant check on cnt > 8
The 2nd check of cnt > 8 is redundant as cnt is already checked and thresholded to a maximum of 8 a few statements earlier. Remove this redundant 2nd check. Detected by CoverityScan, CID#114281 ("Logically dead code") Signed-off-by: Colin Ian King <colin.king@canonical.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
Diffstat (limited to 'drivers/media/usb')
-rw-r--r--drivers/media/usb/pvrusb2/pvrusb2-i2c-core.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/media/usb/pvrusb2/pvrusb2-i2c-core.c b/drivers/media/usb/pvrusb2/pvrusb2-i2c-core.c
index f727b54a53c6..20a52b785fff 100644
--- a/drivers/media/usb/pvrusb2/pvrusb2-i2c-core.c
+++ b/drivers/media/usb/pvrusb2/pvrusb2-i2c-core.c
@@ -488,7 +488,7 @@ static int pvr2_i2c_xfer(struct i2c_adapter *i2c_adap,
if ((ret > 0) || !(msgs[idx].flags & I2C_M_RD)) {
if (cnt > 8) cnt = 8;
printk(KERN_CONT " [");
- for (offs = 0; offs < (cnt>8?8:cnt); offs++) {
+ for (offs = 0; offs < cnt; offs++) {
if (offs) printk(KERN_CONT " ");
printk(KERN_CONT "%02x",msgs[idx].buf[offs]);
}