Re: [PATCH 1/3] dl2k: Handle memory allocation errors in alloc_list

2015-11-18 Thread Ondrej Zary
On Tuesday 17 November 2015, Francois Romieu wrote: > Ondrej Zary : > > If memory allocation fails in alloc_list(), free the already allocated > > memory and return -ENODEV. In rio_open(), call alloc_list() first and > > abort if it fails. Move HW access (set RFDListPtr) out ot alloc_list(). > > >

Re: [PATCH 1/3] dl2k: Handle memory allocation errors in alloc_list

2015-11-17 Thread Francois Romieu
Ondrej Zary : > If memory allocation fails in alloc_list(), free the already allocated > memory and return -ENODEV. 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 ENODEV vs ENOMEM aside, it's ok

[PATCH 1/3] dl2k: Handle memory allocation errors in alloc_list

2015-11-17 Thread Ondrej Zary
If memory allocation fails in alloc_list(), free the already allocated memory and return -ENODEV. 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 --- drivers/net/ethernet/dlink/dl2k.c | 182 +++