浏览代码

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>
Christophe JAILLET 8 年之前
父节点
当前提交
4db069a2bf
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      drivers/gpu/drm/sun4i/sun4i_drv.c

+ 1 - 1
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;
 	}