* [PATCH] usb: Cocci spatch "memdup.spatch"
@ 2013-06-01 9:11 Thomas Meyer
0 siblings, 0 replies; only message in thread
From: Thomas Meyer @ 2013-06-01 9:11 UTC (permalink / raw)
To: mdharm-usb, linux-usb, usb-storage, linux-kernel
Signed-off-by: Thomas Meyer <thomas@m3y3r.de>
---
diff -u -p a/drivers/usb/storage/ene_ub6250.c b/drivers/usb/storage/ene_ub6250.c
--- a/drivers/usb/storage/ene_ub6250.c
+++ b/drivers/usb/storage/ene_ub6250.c
@@ -1928,11 +1928,10 @@ static int ene_load_bincode(struct us_da
usb_stor_dbg(us, "load firmware %s failed\n", fw_name);
goto nofw;
}
- buf = kmalloc(sd_fw->size, GFP_KERNEL);
+ buf = kmemdup(sd_fw->data, sd_fw->size, GFP_KERNEL);
if (buf == NULL)
goto nofw;
- memcpy(buf, sd_fw->data, sd_fw->size);
memset(bcb, 0, sizeof(struct bulk_cb_wrap));
bcb->Signature = cpu_to_le32(US_BULK_CB_SIGN);
bcb->DataTransferLength = sd_fw->size;
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2013-06-01 9:11 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-06-01 9:11 [PATCH] usb: Cocci spatch "memdup.spatch" Thomas Meyer
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®