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: Christoph Hellwig <hch@lst.de>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
/* 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);