Commit 562c5b4d authored by Lionel Landwerlin's avatar Lionel Landwerlin Committed by Daniel Vetter

drm: fix blob pointer check

Check properly that the allocated blob's pointer is valid.
Signed-off-by: default avatarLionel Landwerlin <lionel.g.landwerlin@intel.com>
Reported-by: default avatarDan Carpenter <dan.carpenter@oracle.com>
Cc: Daniel Stone <daniels@collabora.com>
Cc: Daniel Vetter <daniel.vetter@ffwll.ch>
Cc: Matt Roper <matthew.d.roper@intel.com>
Cc: dri-devel@lists.freedesktop.org
Reviewed-by: default avatarDaniel Stone <daniels@collabora.com>
Fixes: 5488dc16 ("drm: introduce pipe color correction properties")
Signed-off-by: default avatarDaniel Vetter <daniel.vetter@ffwll.ch>
Link: http://patchwork.freedesktop.org/patch/msgid/1457611461-9116-1-git-send-email-lionel.g.landwerlin@intel.com
parent 5488dc16
......@@ -2924,8 +2924,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;
}
......
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