projects
/
openwrt
/
staging
/
blogic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
5488dc1
)
drm: fix blob pointer check
author
Lionel Landwerlin
<
[email protected]
>
Thu, 10 Mar 2016 12:04:21 +0000
(12:04 +0000)
committer
Daniel Vetter
<
[email protected]
>
Thu, 10 Mar 2016 12:47:30 +0000
(13:47 +0100)
Check properly that the allocated blob's pointer is valid.
Signed-off-by: Lionel Landwerlin <
[email protected]
>
Reported-by: Dan Carpenter <
[email protected]
>
Cc: Daniel Stone <
[email protected]
>
Cc: Daniel Vetter <
[email protected]
>
Cc: Matt Roper <
[email protected]
>
Cc:
[email protected]
Reviewed-by: Daniel Stone <
[email protected]
>
Fixes: 5488dc16fde7 ("drm: introduce pipe color correction properties")
Signed-off-by: Daniel Vetter <
[email protected]
>
Link:
http://patchwork.freedesktop.org/patch/msgid/
[email protected]
drivers/gpu/drm/drm_atomic_helper.c
patch
|
blob
|
history
diff --git
a/drivers/gpu/drm/drm_atomic_helper.c
b/drivers/gpu/drm/drm_atomic_helper.c
index 3e49a099319127106427246f1d8b04bf00ff55cd..67261ca03fbf468d8c38edfa1af322a2f9b57124 100644
(file)
--- a/
drivers/gpu/drm/drm_atomic_helper.c
+++ b/
drivers/gpu/drm/drm_atomic_helper.c
@@
-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;
}