projects
/
platform
/
kernel
/
linux-rpi3.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
1d083bc
)
drm/edid: catch kmalloc failure in drm_edid_to_speaker_allocation
author
Alex Deucher
<alexander.deucher@amd.com>
Fri, 27 Sep 2013 22:44:39 +0000
(18:44 -0400)
committer
Alex Deucher
<alexander.deucher@amd.com>
Wed, 9 Oct 2013 21:13:43 +0000
(17:13 -0400)
Return -ENOMEM if the allocation fails.
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Reviewed-by: Jani Nikula <jani.nikula@intel.com>
drivers/gpu/drm/drm_edid.c
patch
|
blob
|
history
diff --git
a/drivers/gpu/drm/drm_edid.c
b/drivers/gpu/drm/drm_edid.c
index
1688ff5
..
830f750
100644
(file)
--- a/
drivers/gpu/drm/drm_edid.c
+++ b/
drivers/gpu/drm/drm_edid.c
@@
-2925,6
+2925,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;