media: camss: missing error code in msm_video_register()
authorDan Carpenter <dan.carpenter@oracle.com>
Wed, 9 Dec 2020 06:51:30 +0000 (07:51 +0100)
committerMauro Carvalho Chehab <mchehab+huawei@kernel.org>
Tue, 12 Jan 2021 17:15:18 +0000 (18:15 +0100)
This error path returns success but it should return -EINVAL.

Fixes: cba3819d1e93 ("media: camss: Format configuration per hardware version")
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Reviewed-by: Robert Foss <robert.foss@linaro.org>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
drivers/media/platform/qcom/camss/camss-video.c

index 2fa3214775d58781ee7ef996a49f267f01b111bd..97cea7c4d76971f7474462b5d531c20ed2445f3b 100644 (file)
@@ -961,6 +961,7 @@ int msm_video_register(struct camss_video *video, struct v4l2_device *v4l2_dev,
                        video->nformats = ARRAY_SIZE(formats_rdi_8x96);
                }
        } else {
+               ret = -EINVAL;
                goto error_video_register;
        }