[Intel-gfx] [PATCH] drm: fix blob pointer check
Lionel Landwerlin
lionel.g.landwerlin at intel.com
Thu Mar 10 11:15:59 UTC 2016
As reported by Dan Carpenter.
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin at intel.com>
Cc: Daniel Vetter <daniel.vetter at ffwll.ch>
---
drivers/gpu/drm/drm_atomic_helper.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/gpu/drm/drm_atomic_helper.c b/drivers/gpu/drm/drm_atomic_helper.c
index 87d0b20..1caddb1 100644
--- a/drivers/gpu/drm/drm_atomic_helper.c
+++ b/drivers/gpu/drm/drm_atomic_helper.c
@@ -2917,8 +2917,8 @@ void drm_atomic_helper_legacy_gamma_set(struct drm_crtc *crtc,
blob = drm_property_create_blob(dev,
sizeof(struct drm_color_lut) * size,
NULL);
- if (!blob) {
- ret = -ENOMEM;
+ if (IS_ERR(blob)) {
+ ret = PTR_ERR(blob);
goto fail;
}
--
2.7.0
More information about the Intel-gfx
mailing list