]> git.baikalelectronics.ru Git - kernel.git/commit
scsi: mpt3sas: Fix error returns in BRM_status_show
authorJohannes Thumshirn <johannes.thumshirn@wdc.com>
Wed, 1 Jul 2020 13:14:54 +0000 (22:14 +0900)
committerMartin K. Petersen <martin.petersen@oracle.com>
Wed, 8 Jul 2020 03:46:38 +0000 (23:46 -0400)
commit9fe52ef7e9baa183c95a2cb0fc5b3bbbaca7947f
treea32ea34880208057a617949b59f4d0c1762b19f5
parent2423869dd32fec27ecb19a70c526728ca08fc095
scsi: mpt3sas: Fix error returns in BRM_status_show

BRM_status_show() has several error branches, but none of them record the
error in the error return.

Also while at it remove the manual mutex_unlock() of the pci_access_mutex
in case of an ongoing pci error recovery or host removal and jump to the
cleanup label instead.

Note: We can safely jump to out from here as io_unit_pg3 is initialized to
NULL and if it hasn't been allocated, kfree() skips the NULL pointer.

[mkp: compilation warning]

Link: https://lore.kernel.org/r/20200701131454.5255-1-johannes.thumshirn@wdc.com
Reviewed-by: Damien Le Moal <damien.lemoal@wdc.com>
Acked-by: Sreekanth Reddy <sreekanth.reddy@broadcom.com>
Signed-off-by: Johannes Thumshirn <johannes.thumshirn@wdc.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
drivers/scsi/mpt3sas/mpt3sas_ctl.c