projects
/
linux.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
ca077ff
)
drm/nouveau/disp: switch to use kmemdup() helper
author
Chen Haonan
<chen.haonan2@zte.com.cn>
Tue, 9 Jan 2024 06:24:11 +0000
(14:24 +0800)
committer
Danilo Krummrich
<dakr@redhat.com>
Tue, 9 Jan 2024 17:40:55 +0000
(18:40 +0100)
Use kmemdup() helper instead of open-coding to
simplify the code.
Signed-off-by: Chen Haonan <chen.haonan2@zte.com.cn>
Reviewed-by: Yang Guang <yang.guang5@zte.com.cn>
Reviewed-by: Kees Cook <keescook@chromium.org>
Signed-off-by: Danilo Krummrich <dakr@redhat.com>
Link:
https://patchwork.freedesktop.org/patch/msgid/202401091424115185126@zte.com.cn
drivers/gpu/drm/nouveau/nvif/outp.c
patch
|
blob
|
history
diff --git
a/drivers/gpu/drm/nouveau/nvif/outp.c
b/drivers/gpu/drm/nouveau/nvif/outp.c
index 5d3190c05250a959019ee43e919a666e4082a753..6daeb7f0b09b63fcd8d6f0149c18b4dfd624672f 100644
(file)
--- a/
drivers/gpu/drm/nouveau/nvif/outp.c
+++ b/
drivers/gpu/drm/nouveau/nvif/outp.c
@@
-452,13
+452,12
@@
nvif_outp_edid_get(struct nvif_outp *outp, u8 **pedid)
if (ret)
goto done;
- *pedid = km
alloc(
args->size, GFP_KERNEL);
+ *pedid = km
emdup(args->data,
args->size, GFP_KERNEL);
if (!*pedid) {
ret = -ENOMEM;
goto done;
}
- memcpy(*pedid, args->data, args->size);
ret = args->size;
done:
kfree(args);