projects
/
GitHub
/
moto-9609
/
android_kernel_motorola_exynos9610.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
0aec288
)
drm/edid: catch kmalloc failure in drm_edid_to_speaker_allocation
author
Alex Deucher
<alexdeucher@gmail.com>
Fri, 27 Sep 2013 22:46:09 +0000
(18:46 -0400)
committer
Dave Airlie
<airlied@redhat.com>
Tue, 1 Oct 2013 05:28:57 +0000
(15:28 +1000)
Return -ENOMEM if the allocation fails.
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Reviewed-by: Jani Nikula <jani.nikula@intel.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
drivers/gpu/drm/drm_edid.c
patch
|
blob
|
blame
|
history
diff --git
a/drivers/gpu/drm/drm_edid.c
b/drivers/gpu/drm/drm_edid.c
index 3140a30aa8188150ece08b638253e181d9ada63b..9173be34b4c2a942cdb2798d95eccc431bc1e42b 100644
(file)
--- a/
drivers/gpu/drm/drm_edid.c
+++ b/
drivers/gpu/drm/drm_edid.c
@@
-2937,6
+2937,8
@@
int drm_edid_to_speaker_allocation(struct edid *edid, u8 **sadb)
/* Speaker Allocation Data Block */
if (dbl == 3) {
*sadb = kmalloc(dbl, GFP_KERNEL);
+ if (!*sadb)
+ return -ENOMEM;
memcpy(*sadb, &db[1], dbl);
count = dbl;
break;