[PATCH] v4l: check_v4l2 should return -EINVAL on error

From: Marcin Slusarz
Date: Sun May 11 2008 - 15:59:36 EST


check_v4l2 always returns 0, so this change is an noop for now,
but a comment says it will return something else in the future

Signed-off-by: Marcin Slusarz <marcin.slusarz@xxxxxxxxx>
Cc: Mauro Carvalho Chehab <mchehab@xxxxxxxxxxxxx>
---
compile tested only
---
drivers/media/video/tuner-core.c | 10 +++++-----
1 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/drivers/media/video/tuner-core.c b/drivers/media/video/tuner-core.c
--- a/drivers/media/video/tuner-core.c
+++ b/drivers/media/video/tuner-core.c
@@ -795,7 +795,7 @@ static int tuner_command(struct i2c_client *client, unsigned int cmd, void *arg)
case VIDIOCSAUDIO:
if (check_mode(t, "VIDIOCSAUDIO") == -EINVAL)
return 0;
- if (check_v4l2(t) == EINVAL)
+ if (check_v4l2(t) == -EINVAL)
return 0;

/* Should be implemented, since bttv calls it */
@@ -813,7 +813,7 @@ static int tuner_command(struct i2c_client *client, unsigned int cmd, void *arg)
};
struct video_channel *vc = arg;

- if (check_v4l2(t) == EINVAL)
+ if (check_v4l2(t) == -EINVAL)
return 0;

if (set_mode(client,t,V4L2_TUNER_ANALOG_TV, "VIDIOCSCHAN")==-EINVAL)
@@ -832,7 +832,7 @@ static int tuner_command(struct i2c_client *client, unsigned int cmd, void *arg)

if (check_mode(t, "VIDIOCSFREQ") == -EINVAL)
return 0;
- if (check_v4l2(t) == EINVAL)
+ if (check_v4l2(t) == -EINVAL)
return 0;

set_freq(client, *v);
@@ -844,7 +844,7 @@ static int tuner_command(struct i2c_client *client, unsigned int cmd, void *arg)

if (check_mode(t, "VIDIOCGTUNER") == -EINVAL)
return 0;
- if (check_v4l2(t) == EINVAL)
+ if (check_v4l2(t) == -EINVAL)
return 0;

if (V4L2_TUNER_RADIO == t->mode) {
@@ -888,7 +888,7 @@ static int tuner_command(struct i2c_client *client, unsigned int cmd, void *arg)

if (check_mode(t, "VIDIOCGAUDIO") == -EINVAL)
return 0;
- if (check_v4l2(t) == EINVAL)
+ if (check_v4l2(t) == -EINVAL)
return 0;

if (V4L2_TUNER_RADIO == t->mode) {
--
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/