Commit 4db069a2 authored by Christophe JAILLET's avatar Christophe JAILLET Committed by Maxime Ripard

drm/sun4i: Propagate error to the caller

If 'sun4i_layers_init()' returns an error, propagate it instead of
returning -EINVAL unconditionally.
Signed-off-by: default avatarChristophe JAILLET <christophe.jaillet@wanadoo.fr>
Reviewed-by: default avatarGustavo Padovan <gustavo.padovan@collabora.co.uk>
Signed-off-by: default avatarMaxime Ripard <maxime.ripard@free-electrons.com>
parent 6c08d7ab
...@@ -144,7 +144,7 @@ static int sun4i_drv_bind(struct device *dev) ...@@ -144,7 +144,7 @@ static int sun4i_drv_bind(struct device *dev)
drv->layers = sun4i_layers_init(drm); drv->layers = sun4i_layers_init(drm);
if (IS_ERR(drv->layers)) { if (IS_ERR(drv->layers)) {
dev_err(drm->dev, "Couldn't create the planes\n"); dev_err(drm->dev, "Couldn't create the planes\n");
ret = -EINVAL; ret = PTR_ERR(drv->layers);
goto free_drm; goto free_drm;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment