[media] hackrf: harmless off by one in debug code
authorDan Carpenter <dan.carpenter@oracle.com>
Wed, 24 Sep 2014 10:36:39 +0000 (07:36 -0300)
committerMauro Carvalho Chehab <mchehab@osg.samsung.com>
Tue, 21 Oct 2014 10:56:52 +0000 (08:56 -0200)
My static checker complains that "i" could be one element beyond the end
of the array.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Reviewed-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
drivers/media/usb/hackrf/hackrf.c

index 328b5ba..fd1fa41 100644 (file)
@@ -932,7 +932,7 @@ static int hackrf_set_bandwidth(struct hackrf_dev *dev)
        dev->bandwidth->val = bandwidth;
        dev->bandwidth->cur.val = bandwidth;
 
-       dev_dbg(dev->dev, "bandwidth selected=%d\n", bandwidth_lut[i].freq);
+       dev_dbg(dev->dev, "bandwidth selected=%d\n", bandwidth);
 
        u16tmp = 0;
        u16tmp |= ((bandwidth >> 0) & 0xff) << 0;