summaryrefslogtreecommitdiff
path: root/drivers/media/pci/ttpci/av7110_av.c
diff options
context:
space:
mode:
authorDan Carpenter <dan.carpenter@oracle.com>2015-11-10 20:22:49 -0200
committerMauro Carvalho Chehab <mchehab@osg.samsung.com>2015-11-17 14:36:39 -0200
commit75d63a40a5c01cf6ba9572cb124488a0e3baa6c1 (patch)
tree61eaafdbd72de480f8fd5c3aeb0e37ba0592060b /drivers/media/pci/ttpci/av7110_av.c
parent4623e5967448444a4ea1e77beb58898c4af48693 (diff)
[media] av7110: don't allow negative volumes
The issue here is that we there is a static checker warning because we have a user controlled volume setting and we cap the upper bound but we allow negative numbers. Negative volumes don't make sense, so let's make these variables unsigned. Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
Diffstat (limited to 'drivers/media/pci/ttpci/av7110_av.c')
-rw-r--r--drivers/media/pci/ttpci/av7110_av.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/drivers/media/pci/ttpci/av7110_av.c b/drivers/media/pci/ttpci/av7110_av.c
index 9ed1ec7d3551..ccb3b2c89ef8 100644
--- a/drivers/media/pci/ttpci/av7110_av.c
+++ b/drivers/media/pci/ttpci/av7110_av.c
@@ -280,9 +280,11 @@ int av7110_pes_play(void *dest, struct dvb_ringbuffer *buf, int dlen)
}
-int av7110_set_volume(struct av7110 *av7110, int volleft, int volright)
+int av7110_set_volume(struct av7110 *av7110, unsigned int volleft,
+ unsigned int volright)
{
- int err, vol, val, balance = 0;
+ unsigned int vol, val, balance = 0;
+ int err;
dprintk(2, "av7110:%p, \n", av7110);