mirror of
https://github.com/torvalds/linux.git
synced 2026-05-30 10:04:04 +02:00
scsi: mpt3sas: Fix _ctl_get_mpt_mctp_passthru_adapter() to return IOC pointer
Fix _ctl_get_mpt_mctp_passthru_adapter() to return the correct IOC
pointer to caller based on dev_index.
Signed-off-by: Shivasharan S <shivasharan.srikanteshwara@broadcom.com>
Link: https://lore.kernel.org/r/1747213781-31545-1-git-send-email-shivasharan.srikanteshwara@broadcom.com
Fixes: c72be4b5bb ("scsi: mpt3sas: Add support for MCTP Passthrough commands")
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
This commit is contained in:
parent
25c2758e6e
commit
9ad5249b37
|
|
@ -2869,8 +2869,9 @@ _ctl_get_mpt_mctp_passthru_adapter(int dev_index)
|
|||
if (ioc->facts.IOCCapabilities & MPI26_IOCFACTS_CAPABILITY_MCTP_PASSTHRU) {
|
||||
if (count == dev_index) {
|
||||
spin_unlock(&gioc_lock);
|
||||
return 0;
|
||||
return ioc;
|
||||
}
|
||||
count++;
|
||||
}
|
||||
}
|
||||
spin_unlock(&gioc_lock);
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user