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

From: Martin K. Petersen
Date: Mon Dec 05 2016 - 17:25:01 EST


>>>>> "Pan" == Pan Bian <bianpan201603@xxxxxxx> writes:

Pan> Variable ret is reset in the loop, and its value will be 0 during
Pan> the second and after repeat of the loop. If pci_alloc_consistent()
Pan> returns a NULL pointer then, it will leaves with return value 0. 0
Pan> means no error, which is contrary to the fact. This patches fixes
Pan> the bug, explicitly assigning "-ENOMEM" to return variable ret on
Pan> the path that the call to pci_alloc_consistent() fails.

Applied patches 1 and 2 to 4.10/scsi-queue.

--
Martin K. Petersen Oracle Linux Engineering