projects
/
GitHub
/
LineageOS
/
G12
/
android_kernel_amlogic_linux-4.9.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
c66de8c
)
drm/edid: Use kmemdup instead of kmalloc + memcpy
author
Benoit Taine
<benoit.taine@lip6.fr>
Mon, 26 May 2014 15:21:22 +0000
(17:21 +0200)
committer
Dave Airlie
<airlied@redhat.com>
Tue, 27 May 2014 05:48:11 +0000
(15:48 +1000)
This issue was reported by coccicheck using the semantic patch
at scripts/coccinelle/api/memdup.cocci
Signed-off-by: Benoit Taine <benoit.taine@lip6.fr>
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 7a4fd2ed1280b5d23e1ac46a0c70672a873986e2..d74239fec291a4fe7df742dad5b182dac3d0d6bb 100644
(file)
--- a/
drivers/gpu/drm/drm_edid.c
+++ b/
drivers/gpu/drm/drm_edid.c
@@
-3228,10
+3228,9
@@
int drm_edid_to_speaker_allocation(struct edid *edid, u8 **sadb)
/* Speaker Allocation Data Block */
if (dbl == 3) {
- *sadb = km
alloc(
dbl, GFP_KERNEL);
+ *sadb = km
emdup(&db[1],
dbl, GFP_KERNEL);
if (!*sadb)
return -ENOMEM;
- memcpy(*sadb, &db[1], dbl);
count = dbl;
break;
}