Revision c10e4cafa2698dedb9b61bbf6d68f209e779cb19 authored by Iyappan Subramanian on 21 August 2014, 20:44:48 UTC, committed by David S. Miller on 22 August 2014, 18:25:25 UTC
A NULL pointer dereference is possible for the argument ring->buf_pool
which is passed to xgene_enet_free_desc_ring(), as ring could be NULL.

And now since NULL pointers are being checked for before the calls to
xgene_enet_free_desc_ring(), might as well take advantage of them and
not call the function if the argument would be NULL.

Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Iyappan Subramanian <isubramanian@apm.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
1 parent 2ba5af4
History
File Mode Size
testcase-data
Kconfig -rw-r--r-- 1.3 KB
Makefile -rw-r--r-- 702 bytes
address.c -rw-r--r-- 20.7 KB
base.c -rw-r--r-- 58.7 KB
device.c -rw-r--r-- 4.6 KB
dynamic.c -rw-r--r-- 15.9 KB
fdt.c -rw-r--r-- 27.7 KB
fdt_address.c -rw-r--r-- 6.2 KB
irq.c -rw-r--r-- 15.8 KB
of_mdio.c -rw-r--r-- 7.9 KB
of_mtd.c -rw-r--r-- 2.8 KB
of_net.c -rw-r--r-- 2.4 KB
of_pci.c -rw-r--r-- 3.2 KB
of_pci_irq.c -rw-r--r-- 3.5 KB
of_private.h -rw-r--r-- 3.2 KB
of_reserved_mem.c -rw-r--r-- 7.3 KB
pdt.c -rw-r--r-- 5.9 KB
platform.c -rw-r--r-- 15.6 KB
selftest.c -rw-r--r-- 21.9 KB

back to top