Commit d9c30dbc authored by Christoph Hellwig's avatar Christoph Hellwig Committed by Martin K. Petersen

scsi: wd719x: there should be no active SCBs on removal

Warn on that case instead of trying to free them which would be fatal in
case we actually had active ones.

[mkp: typos]
Signed-off-by: default avatarChristoph Hellwig <hch@lst.de>
Signed-off-by: default avatarMartin K. Petersen <martin.petersen@oracle.com>
parent 4e5598db
......@@ -162,10 +162,9 @@ static void wd719x_destroy(struct wd719x *wd)
/* disable RISC */
wd719x_writeb(wd, WD719X_PCI_MODE_SELECT, 0);
WARN_ON_ONCE(!list_empty(&wd->active_scbs));
/* free all SCBs */
list_for_each_entry(scb, &wd->active_scbs, list)
pci_free_consistent(wd->pdev, sizeof(struct wd719x_scb), scb,
scb->phys);
list_for_each_entry(scb, &wd->free_scbs, list)
pci_free_consistent(wd->pdev, sizeof(struct wd719x_scb), scb,
scb->phys);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment