mirror of
https://github.com/torvalds/linux.git
synced 2024-12-05 02:23:16 +00:00
[SCSI] mptfusion: mptctl panic when loading
Fix panic for when mptctl is loading at the same time when one of the fusion llds (mptsas/mptfc/mptspi) is loading. Signed-off-by: Eric Moore <Eric.Moore@lsil.com> Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
This commit is contained in:
parent
786899b013
commit
d58b2725d2
@ -678,19 +678,19 @@ int
|
|||||||
mpt_device_driver_register(struct mpt_pci_driver * dd_cbfunc, int cb_idx)
|
mpt_device_driver_register(struct mpt_pci_driver * dd_cbfunc, int cb_idx)
|
||||||
{
|
{
|
||||||
MPT_ADAPTER *ioc;
|
MPT_ADAPTER *ioc;
|
||||||
|
const struct pci_device_id *id;
|
||||||
|
|
||||||
if (cb_idx < 1 || cb_idx >= MPT_MAX_PROTOCOL_DRIVERS) {
|
if (cb_idx < 1 || cb_idx >= MPT_MAX_PROTOCOL_DRIVERS)
|
||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
}
|
|
||||||
|
|
||||||
MptDeviceDriverHandlers[cb_idx] = dd_cbfunc;
|
MptDeviceDriverHandlers[cb_idx] = dd_cbfunc;
|
||||||
|
|
||||||
/* call per pci device probe entry point */
|
/* call per pci device probe entry point */
|
||||||
list_for_each_entry(ioc, &ioc_list, list) {
|
list_for_each_entry(ioc, &ioc_list, list) {
|
||||||
if(dd_cbfunc->probe) {
|
id = ioc->pcidev->driver ?
|
||||||
dd_cbfunc->probe(ioc->pcidev,
|
ioc->pcidev->driver->id_table : NULL;
|
||||||
ioc->pcidev->driver->id_table);
|
if (dd_cbfunc->probe)
|
||||||
}
|
dd_cbfunc->probe(ioc->pcidev, id);
|
||||||
}
|
}
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
|
Loading…
Reference in New Issue
Block a user