Skip to contentSkip to conversation

staging: gdm72xx: zero out padding

PATCH New Dan Carpenter 1 participant 1 message Feb 22, 2016

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 4/6 staging: gdm72xx: zero out padding

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.

drivers/staging/gdm72xx/usb_boot.c +1 -1
index 3082987..4431a80 100644
@@ -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;