aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/rapidio/rio.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/rapidio/rio.c b/drivers/rapidio/rio.c
index f4f30af2df68..2e8a20cac588 100644
--- a/drivers/rapidio/rio.c
+++ b/drivers/rapidio/rio.c
@@ -1715,11 +1715,13 @@ int rio_unregister_scan(int mport_id, struct rio_scan *scan_ops)
1715 (mport_id == RIO_MPORT_ANY && port->nscan == scan_ops)) 1715 (mport_id == RIO_MPORT_ANY && port->nscan == scan_ops))
1716 port->nscan = NULL; 1716 port->nscan = NULL;
1717 1717
1718 list_for_each_entry(scan, &rio_scans, node) 1718 list_for_each_entry(scan, &rio_scans, node) {
1719 if (scan->mport_id == mport_id) { 1719 if (scan->mport_id == mport_id) {
1720 list_del(&scan->node); 1720 list_del(&scan->node);
1721 kfree(scan); 1721 kfree(scan);
1722 break;
1722 } 1723 }
1724 }
1723 1725
1724 mutex_unlock(&rio_mport_list_lock); 1726 mutex_unlock(&rio_mport_list_lock);
1725 1727