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

2016-12-05 Thread Martin K. Petersen
> "Pan" == Pan Bian writes: Pan> Variable ret is reset in the loop, and its value will be 0 during Pan> the after repeat of the loop. Then, if pci_alloc_consistent() Pan> returns NULL, the return value is 0. 0 means no error, which may Pan> make it impossible for the callers of beiscsi_create

[PATCH 1/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_cqs() to detect the memory allocation error. This