Commit 9f93c527 authored by Dan Carpenter's avatar Dan Carpenter Committed by Mauro Carvalho Chehab

[media] hackrf: harmless off by one in debug code

My static checker complains that "i" could be one element beyond the end
of the array.
Signed-off-by: default avatarDan Carpenter <dan.carpenter@oracle.com>
Reviewed-by: default avatarAntti Palosaari <crope@iki.fi>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@osg.samsung.com>
parent 143800a5
...@@ -932,7 +932,7 @@ static int hackrf_set_bandwidth(struct hackrf_dev *dev) ...@@ -932,7 +932,7 @@ static int hackrf_set_bandwidth(struct hackrf_dev *dev)
dev->bandwidth->val = bandwidth; dev->bandwidth->val = bandwidth;
dev->bandwidth->cur.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 = 0;
u16tmp |= ((bandwidth >> 0) & 0xff) << 0; u16tmp |= ((bandwidth >> 0) & 0xff) << 0;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment