From: Christophe JAILLET Date: Fri, 4 Nov 2016 06:13:52 +0000 (+0100) Subject: drm/sun4i: Propagate error to the caller X-Git-Tag: v4.9-rc6~21^2~2^2 X-Git-Url: https://git.kernelconcepts.de/?a=commitdiff_plain;h=4db069a2bf990e278ea57ff615dcaa89b85376bd;p=karo-tx-linux.git 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 Reviewed-by: Gustavo Padovan Signed-off-by: Maxime Ripard --- 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; }