]> git.baikalelectronics.ru Git - kernel.git/commit
dl2k: Handle memory allocation errors in alloc_list
authorOndrej Zary <linux@rainbow-software.org>
Thu, 19 Nov 2015 19:13:04 +0000 (20:13 +0100)
committerDavid S. Miller <davem@davemloft.net>
Fri, 20 Nov 2015 19:48:27 +0000 (14:48 -0500)
commita71d238bb31f311dfab36047bd6978f3bd79aa33
tree55f352047e7612cce6f7f508a15a8ba36fe09005
parentd4897caa172d5ce0f50ab14cc8af7ebeddd38dc9
dl2k: Handle memory allocation errors in alloc_list

If memory allocation fails in alloc_list(), free the already allocated
memory and return -ENOMEM. In rio_open(), call alloc_list() first and
abort if it fails. Move HW access (set RFDListPtr) out ot alloc_list().

Signed-off-by: Ondrej Zary <linux@rainbow-software.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/dlink/dl2k.c