scsi: be2iscsi: Fix error return code
authorChristophe JAILLET <christophe.jaillet@wanadoo.fr>
Fri, 26 Aug 2016 09:39:06 +0000 (15:09 +0530)
committerMartin K. Petersen <martin.petersen@oracle.com>
Wed, 31 Aug 2016 02:24:40 +0000 (22:24 -0400)
commitdeeea8edc746c68d7aa2282322b14be701ec11ee
tree1f2de92fb403a095afdc9b0c62f569acdb8532ed
parent51f9039ffd751dee54fe26609df645bfd128b1d0
scsi: be2iscsi: Fix error return code

We know that 'ret' is not an error code because it has been tested a few
lines above.  So, if one of these function fails, 0 will be returned
instead of an error code.  Return -ENOMEM instead.

Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
'ret' needs to be set with error code if hba_setup_cid_tbls fails.

Signed-off-by: Jitendra Bhivare <jitendra.bhivare@broadcom.com>
Reviewed-by: Johannes Thumshirn <jthumshirn@suse.de>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
drivers/scsi/be2iscsi/be_main.c