Skip to content
Commit 7ed4eb51 authored by Lino Sanfilippo's avatar Lino Sanfilippo Committed by Greg Kroah-Hartman
Browse files

staging: slicoss: handle allocation failure in slic_init_adapter



The memory allocation in slic_init_adapter() can fail. Return an error in
this case and unwind properly. Also make sure that the allocated memory is
properly freed in case of an error in the calling probe() function.
By doing this also replace the alloc() followed by memset to zero the
memory with a zalloc() version.

Signed-off-by: default avatarLino Sanfilippo <LinoSanfilippo@gmx.de>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent f56edd42
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment