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@xxxxxxxxx> Cc: Neil Armstrong <narmstrong@xxxxxxxxxxxx> --- drivers/media/platform/meson/ge2d/ge2d.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/media/platform/meson/ge2d/ge2d.c b/drivers/media/platform/meson/ge2d/ge2d.c index f526501bd473..153612ca96fc 100644 --- a/drivers/media/platform/meson/ge2d/ge2d.c +++ b/drivers/media/platform/meson/ge2d/ge2d.c @@ -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; } -- 2.29.2