]> git.kernelconcepts.de Git - karo-tx-linux.git/commitdiff
drm/sun4i: Propagate error to the caller
authorChristophe JAILLET <christophe.jaillet@wanadoo.fr>
Fri, 4 Nov 2016 06:13:52 +0000 (07:13 +0100)
committerMaxime Ripard <maxime.ripard@free-electrons.com>
Mon, 7 Nov 2016 15:09:35 +0000 (16:09 +0100)
If 'sun4i_layers_init()' returns an error, propagate it instead of
returning -EINVAL unconditionally.

Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
Reviewed-by: Gustavo Padovan <gustavo.padovan@collabora.co.uk>
Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com>
drivers/gpu/drm/sun4i/sun4i_drv.c

index 077f3785439ee5d77d9a799b052e7ad674827dea..70e9fd59c5a24650f7e89f2db5d1a780cc2683d9 100644 (file)
@@ -144,7 +144,7 @@ static int sun4i_drv_bind(struct device *dev)
        drv->layers = sun4i_layers_init(drm);
        if (IS_ERR(drv->layers)) {
                dev_err(drm->dev, "Couldn't create the planes\n");
-               ret = -EINVAL;
+               ret = PTR_ERR(drv->layers);
                goto free_drm;
        }