Skip to content

Commit 9ad5249

Browse files
shivasharan-smartinkpetersen
authored andcommitted
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: c72be4b ("scsi: mpt3sas: Add support for MCTP Passthrough commands") Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
1 parent 25c2758 commit 9ad5249

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

drivers/scsi/mpt3sas/mpt3sas_ctl.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2869,8 +2869,9 @@ _ctl_get_mpt_mctp_passthru_adapter(int dev_index)
28692869
if (ioc->facts.IOCCapabilities & MPI26_IOCFACTS_CAPABILITY_MCTP_PASSTHRU) {
28702870
if (count == dev_index) {
28712871
spin_unlock(&gioc_lock);
2872-
return 0;
2872+
return ioc;
28732873
}
2874+
count++;
28742875
}
28752876
}
28762877
spin_unlock(&gioc_lock);

0 commit comments

Comments
 (0)