All of lore.kernel.org
 help / color / mirror / Atom feed
* [patch 4/6] staging: gdm72xx: zero out padding
@ 2016-02-22 19:32 ` Dan Carpenter
  0 siblings, 0 replies; 2+ messages in thread
From: Dan Carpenter @ 2016-02-22 19:32 UTC (permalink / raw)
  To: Greg Kroah-Hartman
  Cc: Sudip Mukherjee, Alison Schofield, devel, linux-kernel,
	kernel-janitors

We pad the start of this buffer with 256 bytes of padding.   It's not
clear to me exactly what's going on or how it's used but let's zero it
out.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>

diff --git a/drivers/staging/gdm72xx/usb_boot.c b/drivers/staging/gdm72xx/usb_boot.c
index 3082987..4431a80 100644
--- a/drivers/staging/gdm72xx/usb_boot.c
+++ b/drivers/staging/gdm72xx/usb_boot.c
@@ -286,7 +286,7 @@ static int em_download_image(struct usb_device *usbdev, const char *img_name,
 		return ret;
 	}
 
-	buf = kmalloc(DOWNLOAD_CHUCK + pad_size, GFP_KERNEL);
+	buf = kzalloc(DOWNLOAD_CHUCK + pad_size, GFP_KERNEL);
 	if (!buf) {
 		release_firmware(firm);
 		return -ENOMEM;

^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2016-02-22 19:32 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-02-22 19:32 [patch 4/6] staging: gdm72xx: zero out padding Dan Carpenter
2016-02-22 19:32 ` Dan Carpenter

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.