[SCSI] qla2xxx: Avoid null pointer dereference in shutdown routine.

Signed-off-by: Masanari Iida <standby24x7@gmail.com>
Signed-off-by: Saurav Kashyap <saurav.kashyap@qlogic.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
This commit is contained in:
Masanari Iida 2013-02-08 01:57:44 -05:00 committed by James Bottomley
parent a865c50a64
commit 552f3f9aca

View file

@ -2808,6 +2808,9 @@ qla2x00_shutdown(struct pci_dev *pdev)
scsi_qla_host_t *vha;
struct qla_hw_data *ha;
if (!atomic_read(&pdev->enable_cnt))
return;
vha = pci_get_drvdata(pdev);
ha = vha->hw;