]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
media: TDA1997x: fix tda1997x_query_dv_timings() return value
authorKrzysztof Hałasa <khalasa@piap.pl>
Mon, 26 Jul 2021 10:46:28 +0000 (12:46 +0200)
committerMauro Carvalho Chehab <mchehab+huawei@kernel.org>
Wed, 4 Aug 2021 12:43:52 +0000 (14:43 +0200)
Correctly propagate the tda1997x_detect_std error value.

Signed-off-by: Krzysztof Hałasa <khalasa@piap.pl>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
drivers/media/i2c/tda1997x.c

index 71194746c874f0aa51a330f4b921108e6f664d61..98b7c39e3e9b61861075ff6543fee72703148212 100644 (file)
@@ -1695,14 +1695,15 @@ static int tda1997x_query_dv_timings(struct v4l2_subdev *sd,
                                     struct v4l2_dv_timings *timings)
 {
        struct tda1997x_state *state = to_state(sd);
+       int ret;
 
        v4l_dbg(1, debug, state->client, "%s\n", __func__);
        memset(timings, 0, sizeof(struct v4l2_dv_timings));
        mutex_lock(&state->lock);
-       tda1997x_detect_std(state, timings);
+       ret = tda1997x_detect_std(state, timings);
        mutex_unlock(&state->lock);
 
-       return 0;
+       return ret;
 }
 
 static const struct v4l2_subdev_video_ops tda1997x_video_ops = {