media: sun6i-csi: add a missing return code
authorMauro Carvalho Chehab <mchehab+huawei@kernel.org>
Thu, 10 Jun 2021 06:20:16 +0000 (08:20 +0200)
committerMauro Carvalho Chehab <mchehab+huawei@kernel.org>
Thu, 17 Jun 2021 07:25:48 +0000 (09:25 +0200)
As pointed by smatch, there's a missing return code:

drivers/media/platform/sunxi/sun6i-csi/sun6i_video.c:485 sun6i_video_open() warn: missing error code 'ret'

Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
drivers/media/platform/sunxi/sun6i-csi/sun6i_video.c

index 3181d07..07b2161 100644 (file)
@@ -481,8 +481,10 @@ static int sun6i_video_open(struct file *file)
                goto fh_release;
 
        /* check if already powered */
-       if (!v4l2_fh_is_singular_file(file))
+       if (!v4l2_fh_is_singular_file(file)) {
+               ret = -EBUSY;
                goto unlock;
+       }
 
        ret = sun6i_csi_set_power(video->csi, true);
        if (ret < 0)