iscsi-target: return -ENOMEM instead of -1 in case of failed kmalloc()
authorLuis de Bethencourt <luisbg@osg.samsung.com>
Mon, 19 Oct 2015 20:18:24 +0000 (21:18 +0100)
committerNicholas Bellinger <nab@linux-iscsi.org>
Sun, 29 Nov 2015 03:32:59 +0000 (19:32 -0800)
commit82a819e8fb5f36c2a0e14b92bc820225c484a387
tree3c958b36c6bdeeea4953f58b2b8334d6cc617b57
parent6ba4bd297d99ad522a6414001e6837ddaa8753fd
iscsi-target: return -ENOMEM instead of -1 in case of failed kmalloc()

Smatch complains about returning hard coded error codes, silence this
warning.

drivers/target/iscsi/iscsi_target_parameters.c:211
   iscsi_create_default_params() warn: returning -1 instead of -ENOMEM is sloppy

Signed-off-by: Luis de Bethencourt <luisbg@osg.samsung.com>
Reviewed-by: Sagi Grimberg <sagig@mellanox.com>
Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org>
drivers/target/iscsi/iscsi_target_parameters.c