public inbox for linux-arm-kernel@lists.infradead.org
 help / color / mirror / Atom feed
* [PATCH] drm/sun4i: Fix error handling
@ 2016-10-30  8:49 Christophe JAILLET
  2016-10-30 11:53 ` Christophe JAILLET
  2016-11-02 17:57 ` Maxime Ripard
  0 siblings, 2 replies; 6+ messages in thread
From: Christophe JAILLET @ 2016-10-30  8:49 UTC (permalink / raw)
  To: linux-arm-kernel

'sun4i_layers_init()' returns an error pointer in case of error, not
NULL. So test it with IS_ERR.

Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
---
 drivers/gpu/drm/sun4i/sun4i_drv.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/sun4i/sun4i_drv.c b/drivers/gpu/drm/sun4i/sun4i_drv.c
index 9776f0305834..628712e6edd6 100644
--- a/drivers/gpu/drm/sun4i/sun4i_drv.c
+++ b/drivers/gpu/drm/sun4i/sun4i_drv.c
@@ -143,7 +143,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;
-- 
2.9.3

^ permalink raw reply related	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2016-11-08 20:38 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-10-30  8:49 [PATCH] drm/sun4i: Fix error handling Christophe JAILLET
2016-10-30 11:53 ` Christophe JAILLET
2016-11-02 18:14   ` Maxime Ripard
2016-11-05  6:15     ` Christophe JAILLET
2016-11-08 20:38       ` Maxime Ripard
2016-11-02 17:57 ` Maxime Ripard

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox