OSDN Git Service

staging: wilc1000: return -ENOMEM when kmalloc failed
authorLuis de Bethencourt <luisbg@osg.samsung.com>
Mon, 26 Oct 2015 05:52:50 +0000 (05:52 +0000)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 27 Oct 2015 05:26:23 +0000 (14:26 +0900)
commit9081987d4f1acc2af9f578e6ca8b10748b438be6
treedfcaffeb617ec3d4f241d8d5600eb8f6217b29ad
parentdf8b4830a0ac547a18cdf701ca9a04b4c4f3b05b
staging: wilc1000: return -ENOMEM when kmalloc failed

The driver is using -1 instead of the -ENOMEM defined macro to specify that
a buffer allocation failed.

Fixes smatch warning and similars:
drivers/staging/wilc1000/host_interface.c:1757 Handle_Key() warn:
returning -1 instead of -ENOMEM is sloppy

Signed-off-by: Luis de Bethencourt <luisbg@osg.samsung.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/wilc1000/host_interface.c