Skip to content

Commit

Permalink
[media] hackrf: harmless off by one in debug code
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Dan Carpenter authored and Mauro Carvalho Chehab committed Oct 21, 2014
1 parent 143800a commit 9f93c52
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/media/usb/hackrf/hackrf.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 9f93c52

Please sign in to comment.