aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/video/cx231xx/cx231xx-video.c
diff options
context:
space:
mode:
authorDan Carpenter <error27@gmail.com>2010-04-02 07:30:10 -0400
committerMauro Carvalho Chehab <mchehab@redhat.com>2010-05-19 11:57:30 -0400
commit8e47567f7d24346980f109d7eaed083106ff170d (patch)
tree8317809620c4386e0acd828cff8aa43ce365d96f /drivers/media/video/cx231xx/cx231xx-video.c
parentf76280154cdbb0ad02d5402972d1eb85f9e2898a (diff)
V4L/DVB: cx231xx: improve error handling
Return -EINVAL if we don't find the control id. Signed-off-by: Dan Carpenter <error27@gmail.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media/video/cx231xx/cx231xx-video.c')
-rw-r--r--drivers/media/video/cx231xx/cx231xx-video.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/drivers/media/video/cx231xx/cx231xx-video.c b/drivers/media/video/cx231xx/cx231xx-video.c
index 16a73eab6726..597c416218cf 100644
--- a/drivers/media/video/cx231xx/cx231xx-video.c
+++ b/drivers/media/video/cx231xx/cx231xx-video.c
@@ -1902,9 +1902,12 @@ static int radio_queryctrl(struct file *file, void *priv,
1902 if (c->id < V4L2_CID_BASE || c->id >= V4L2_CID_LASTP1) 1902 if (c->id < V4L2_CID_BASE || c->id >= V4L2_CID_LASTP1)
1903 return -EINVAL; 1903 return -EINVAL;
1904 if (c->id == V4L2_CID_AUDIO_MUTE) { 1904 if (c->id == V4L2_CID_AUDIO_MUTE) {
1905 for (i = 0; i < CX231XX_CTLS; i++) 1905 for (i = 0; i < CX231XX_CTLS; i++) {
1906 if (cx231xx_ctls[i].v.id == c->id) 1906 if (cx231xx_ctls[i].v.id == c->id)
1907 break; 1907 break;
1908 }
1909 if (i == CX231XX_CTLS)
1910 return -EINVAL;
1908 *c = cx231xx_ctls[i].v; 1911 *c = cx231xx_ctls[i].v;
1909 } else 1912 } else
1910 *c = no_ctl; 1913 *c = no_ctl;