Skip to content

Commit

Permalink
drm/sun4i: Propagate error to the caller
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Christophe JAILLET authored and Maxime Ripard committed Nov 7, 2016
1 parent 6c08d7a commit 4db069a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/gpu/drm/sun4i/sun4i_drv.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand Down

0 comments on commit 4db069a

Please sign in to comment.