Commit 6c08d7ab authored by Christophe JAILLET's avatar Christophe JAILLET Committed by Maxime Ripard

drm/sun4i: Fix error handling

'sun4i_layers_init()' returns an error pointer in case of error, not
NULL. So test it with IS_ERR.
Signed-off-by: default avatarChristophe JAILLET <christophe.jaillet@wanadoo.fr>
Signed-off-by: default avatarMaxime Ripard <maxime.ripard@free-electrons.com>
parent 0df03b43
......@@ -142,7 +142,7 @@ static int sun4i_drv_bind(struct device *dev)
/* Create our layers */
drv->layers = sun4i_layers_init(drm);
if (!drv->layers) {
if (IS_ERR(drv->layers)) {
dev_err(drm->dev, "Couldn't create the planes\n");
ret = -EINVAL;
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