media: bcm2835: unicam: Fix uninitialized warning
authorJacko Dirks <jdirks.linuxdev@gmail.com>
Tue, 5 May 2020 12:33:31 +0000 (14:33 +0200)
committerDom Cobley <popcornmix@gmail.com>
Mon, 19 Feb 2024 11:33:03 +0000 (11:33 +0000)
Signed-off-by: Jacko Dirks <jdirks.linuxdev@gmail.com>
drivers/media/platform/bcm2835/bcm2835-unicam.c

index f189ddb..1cb3c87 100644 (file)
@@ -1006,7 +1006,7 @@ const struct unicam_fmt *get_first_supported_format(struct unicam_device *dev)
        struct v4l2_subdev_mbus_code_enum mbus_code;
        const struct unicam_fmt *fmt = NULL;
        unsigned int i;
-       int ret;
+       int ret = 0;
 
        for (i = 0; ret != -EINVAL && ret != -ENOIOCTLCMD; ++i) {
                memset(&mbus_code, 0, sizeof(mbus_code));