Skip to content

Commit

Permalink
[SCSI] qla2xxx: Avoid null pointer dereference in shutdown routine.
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Masanari Iida authored and James Bottomley committed Feb 22, 2013
1 parent a865c50 commit 552f3f9
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions drivers/scsi/qla2xxx/qla_os.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down

0 comments on commit 552f3f9

Please sign in to comment.