greybus: zero all data buffers

Don't assume the buffer data area will all be overwritten.  Zero all
buffer space, to avoid sending crap over the wire.

Signed-off-by: Alex Elder <elder@linaro.org>
Signed-off-by: Greg Kroah-Hartman <greg@kroah.com>
This commit is contained in:
Alex Elder
2014-10-16 06:35:28 -05:00
committed by Greg Kroah-Hartman
parent 170229d195
commit a7901d5ef7

View File

@@ -113,7 +113,7 @@ static int alloc_gbuf_data(struct gbuf *gbuf, unsigned int size,
* CPort Id before the data; set aside an extra byte for
* that purpose in that case.
*/
buffer = kmalloc(cport_reserve + size, gfp_mask);
buffer = kzalloc(cport_reserve + size, gfp_mask);
if (!buffer)
return -ENOMEM;