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:
77e9c35
)
drm/tinydrm: Use kmemdup rather than duplicating its implementation in repaper_spi_tr...
author
YueHaibing
<yuehaibing@huawei.com>
Thu, 29 Nov 2018 06:00:33 +0000
(06:00 +0000)
committer
Noralf Trønnes
<noralf@tronnes.org>
Tue, 4 Dec 2018 14:57:42 +0000
(15:57 +0100)
use kmemdup rather than duplicating its implementation
Signed-off-by: YueHaibing <yuehaibing@huawei.com>
Signed-off-by: Noralf Trønnes <noralf@tronnes.org>
Link:
https://patchwork.freedesktop.org/patch/msgid/1543471233-159568-1-git-send-email-yuehaibing@huawei.com
drivers/gpu/drm/tinydrm/repaper.c
patch
|
blob
|
history
diff --git
a/drivers/gpu/drm/tinydrm/repaper.c
b/drivers/gpu/drm/tinydrm/repaper.c
index 07f45a008a0f7c208b2f88b4b0a3d536e9e9b3db..54d6fe0f37ce8b2a72133027d4a313bd4458557c 100644
(file)
--- a/
drivers/gpu/drm/tinydrm/repaper.c
+++ b/
drivers/gpu/drm/tinydrm/repaper.c
@@
-108,12
+108,11
@@
static int repaper_spi_transfer(struct spi_device *spi, u8 header,
/* Stack allocated tx? */
if (tx && len <= 32) {
- txbuf = km
alloc(
len, GFP_KERNEL);
+ txbuf = km
emdup(tx,
len, GFP_KERNEL);
if (!txbuf) {
ret = -ENOMEM;
goto out_free;
}
- memcpy(txbuf, tx, len);
}
if (rx) {