aboutsummaryrefslogtreecommitdiff
path: root/drivers/message/fusion
diff options
context:
space:
mode:
authorEric Moore <eric.moore@lsil.com>2006-07-11 17:23:23 -0600
committerJames Bottomley <jejb@mulgrave.il.steeleye.com>2006-07-13 09:18:22 -0400
commitd58b2725d28041ff9412fecb109bebf76b1a9b26 (patch)
treeb0eafa2d64aeda3eab7111ab0730ce847529f875 /drivers/message/fusion
parent786899b013cdf7aeb2aaaf7390c442f02bba24af (diff)
[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>
Diffstat (limited to 'drivers/message/fusion')
-rw-r--r--drivers/message/fusion/mptbase.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/drivers/message/fusion/mptbase.c b/drivers/message/fusion/mptbase.c
index 43308df6462..10def27c1af 100644
--- a/drivers/message/fusion/mptbase.c
+++ b/drivers/message/fusion/mptbase.c
@@ -678,19 +678,19 @@ int
mpt_device_driver_register(struct mpt_pci_driver * dd_cbfunc, int cb_idx)
{
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;
- }
MptDeviceDriverHandlers[cb_idx] = dd_cbfunc;
/* call per pci device probe entry point */
list_for_each_entry(ioc, &ioc_list, list) {
- if(dd_cbfunc->probe) {
- dd_cbfunc->probe(ioc->pcidev,
- ioc->pcidev->driver->id_table);
- }
+ id = ioc->pcidev->driver ?
+ ioc->pcidev->driver->id_table : NULL;
+ if (dd_cbfunc->probe)
+ dd_cbfunc->probe(ioc->pcidev, id);
}
return 0;