media: meson/ge2d: set ret to -ENOMEM
authorHans Verkuil <hverkuil-cisco@xs4all.nl>
Wed, 20 Jan 2021 08:33:37 +0000 (09:33 +0100)
committerMauro Carvalho Chehab <mchehab+huawei@kernel.org>
Wed, 27 Jan 2021 07:32:16 +0000 (08:32 +0100)
Fix this smatch warning:

drivers/media/platform/meson/ge2d/ge2d.c:991 ge2d_probe() warn: missing error code 'ret'

when video_device_alloc() returns NULL.

Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Cc: Neil Armstrong <narmstrong@baylibre.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
drivers/media/platform/meson/ge2d/ge2d.c

index f526501..153612c 100644 (file)
@@ -988,6 +988,7 @@ static int ge2d_probe(struct platform_device *pdev)
        vfd = video_device_alloc();
        if (!vfd) {
                v4l2_err(&ge2d->v4l2_dev, "Failed to allocate video device\n");
+               ret = -ENOMEM;
                goto unreg_v4l2_dev;
        }