Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1512025
| From | Christophe JAILLET <christophe.jaillet@wanadoo.fr> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | [PATCH] drm/sun4i: Fix error handling |
| Date | 2016-10-30 10:00 +0100 |
| Message-ID | <sxU89-2mo-5@gated-at.bofh.it> (permalink) |
| Organization | linux.* mail to news gateway |
'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
Back to linux.kernel | Previous | Next — Next in thread | Find similar | Unroll thread
[PATCH] drm/sun4i: Fix error handling Christophe JAILLET <christophe.jaillet@wanadoo.fr> - 2016-10-30 10:00 +0100
Re: [PATCH] drm/sun4i: Fix error handling Christophe JAILLET <christophe.jaillet@wanadoo.fr> - 2016-10-30 13:00 +0100
Re: [PATCH] drm/sun4i: Fix error handling Maxime Ripard <maxime.ripard@free-electrons.com> - 2016-11-02 19:20 +0100
Re: [PATCH] drm/sun4i: Fix error handling Christophe JAILLET <christophe.jaillet@wanadoo.fr> - 2016-11-05 07:20 +0100
Re: [PATCH] drm/sun4i: Fix error handling Maxime Ripard <maxime.ripard@free-electrons.com> - 2016-11-08 21:40 +0100
Re: [PATCH] drm/sun4i: Fix error handling Maxime Ripard <maxime.ripard@free-electrons.com> - 2016-11-02 19:00 +0100
csiph-web