[PATCH 2/2 v2] scsi: be2iscsi: set errno on error path

2016-12-04 Thread Pan Bian
Variable ret is reset in the loop, and its value will be 0 during the after repeat of the loop. Then, if pci_alloc_consistent() returns NULL, the return value is 0. 0 means no error, which may make it impossible for the callers of beiscsi_create_eqs() to detect the memory allocation error. This

[PATCH 2/2 v2] scsi: be2iscsi: set errno on error path

2016-12-04 Thread Pan Bian
Variable ret is reset in the loop, and its value will be 0 during the after repeat of the loop. Then, if pci_alloc_consistent() returns NULL, the return value is 0. 0 means no error, which may make it impossible for the callers of beiscsi_create_eqs() to detect the memory allocation error. This