v4l: check_v4l2 should return -EINVAL on error
PATCH 1/1 v4l: check_v4l2 should return -EINVAL on error
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 <[email protected]>
Cc Mauro Carvalho Chehab <[email protected]>
---
compile tested only
--- drivers/media/video/tuner-core.c | 10 +++++----- 1 files changed, 5 insertions(+), 5 deletions(-)
drivers/media/video/tuner-core.c +5 -5
@@ -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) {