aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChristophe JAILLET <christophe.jaillet@wanadoo.fr>2016-11-04 02:13:52 -0400
committerMaxime Ripard <maxime.ripard@free-electrons.com>2016-11-07 10:09:35 -0500
commit4db069a2bf990e278ea57ff615dcaa89b85376bd (patch)
tree822ccf0457b2c2611d21e1fb120bbca4fd95f8b0
parent6c08d7ab23dd07c046e8de1520073053bdc76ae2 (diff)
drm/sun4i: Propagate error to the caller
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>
-rw-r--r--drivers/gpu/drm/sun4i/sun4i_drv.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/gpu/drm/sun4i/sun4i_drv.c b/drivers/gpu/drm/sun4i/sun4i_drv.c
index 077f3785439e..70e9fd59c5a2 100644
--- a/drivers/gpu/drm/sun4i/sun4i_drv.c
+++ b/drivers/gpu/drm/sun4i/sun4i_drv.c
@@ -144,7 +144,7 @@ static int sun4i_drv_bind(struct device *dev)
144 drv->layers = sun4i_layers_init(drm); 144 drv->layers = sun4i_layers_init(drm);
145 if (IS_ERR(drv->layers)) { 145 if (IS_ERR(drv->layers)) {
146 dev_err(drm->dev, "Couldn't create the planes\n"); 146 dev_err(drm->dev, "Couldn't create the planes\n");
147 ret = -EINVAL; 147 ret = PTR_ERR(drv->layers);
148 goto free_drm; 148 goto free_drm;
149 } 149 }
150 150