summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm
diff options
context:
space:
mode:
authorChristophe JAILLET2016-11-04 07:13:52 +0100
committerMaxime Ripard2016-11-07 16:09:35 +0100
commit4db069a2bf990e278ea57ff615dcaa89b85376bd (patch)
tree822ccf0457b2c2611d21e1fb120bbca4fd95f8b0 /drivers/gpu/drm
parentdrm/sun4i: Fix error handling (diff)
downloadkernel-qcow2-linux-4db069a2bf990e278ea57ff615dcaa89b85376bd.tar.gz
kernel-qcow2-linux-4db069a2bf990e278ea57ff615dcaa89b85376bd.tar.xz
kernel-qcow2-linux-4db069a2bf990e278ea57ff615dcaa89b85376bd.zip
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>
Diffstat (limited to 'drivers/gpu/drm')
-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)
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;
}