sh_eth: fix uninitialized arrays in sh_eth_ring_init()
authorSergei Shtylyov <sergei.shtylyov@cogentembedded.com>
Fri, 30 Oct 2015 23:05:56 +0000 (02:05 +0300)
committerDavid S. Miller <davem@davemloft.net>
Mon, 2 Nov 2015 20:56:11 +0000 (15:56 -0500)
commit2c94e8567d7c7c9d619584da857e9f5b28f283ea
tree3edd2e76972a77d9d72b83653814e60dcb494461
parent615a1003c6502f0d1812fd2dbe08e86b1c3f5db9
sh_eth: fix uninitialized arrays in sh_eth_ring_init()

sh_eth_ring_free()  called in the sh_eth_ring_init()'s error path expects
the arrays pointed  to  by 'sh_eth_private::[rt]x_skbuff' to be initialized
with NULLs but they are allocated with just kmalloc_array() and so are left
filled with random data. Use kcalloc() instead.

Signed-off-by: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/renesas/sh_eth.c