diff options
author | Christophe JAILLET <christophe.jaillet@wanadoo.fr> | 2016-11-04 07:13:52 +0100 |
---|---|---|
committer | Maxime Ripard <maxime.ripard@free-electrons.com> | 2016-11-07 16:09:35 +0100 |
commit | 4db069a2bf990e278ea57ff615dcaa89b85376bd (patch) | |
tree | 822ccf0457b2c2611d21e1fb120bbca4fd95f8b0 | |
parent | 6c08d7ab23dd07c046e8de1520073053bdc76ae2 (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.c | 2 |
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; } |