drm/mcde: Fix an error handling path in 'mcde_probe()'
authorChristophe JAILLET <christophe.jaillet@wanadoo.fr>
Thu, 22 Aug 2019 21:15:18 +0000 (23:15 +0200)
committerLinus Walleij <linus.walleij@linaro.org>
Mon, 26 Aug 2019 20:07:09 +0000 (22:07 +0200)
If we don't find any matching components, we should go through the error
handling path, in order to free some resources.

Fixes: ca5be902a87d ("drm/mcde: Fix uninitialized variable")
Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Link: https://patchwork.freedesktop.org/patch/msgid/20190822211518.5578-1-christophe.jaillet@wanadoo.fr
drivers/gpu/drm/mcde/mcde_drv.c

index 982fe8485a617ad4bb4cd66c39c34f61ed07c83e..0561fbd99df0eeb81514e3be30cb90af62614234 100644 (file)
@@ -485,7 +485,8 @@ static int mcde_probe(struct platform_device *pdev)
        }
        if (!match) {
                dev_err(dev, "no matching components\n");
-               return -ENODEV;
+               ret = -ENODEV;
+               goto clk_disable;
        }
        if (IS_ERR(match)) {
                dev_err(dev, "could not create component match\n");