NTB: ntb_transport: Free MWs in ntb_transport_link_cleanup()
[linux-2.6-microblaze.git] / drivers / ntb / ntb_transport.c
index 3bfdb45..6e8902d 100644 (file)
@@ -862,6 +862,9 @@ static void ntb_transport_link_cleanup(struct ntb_transport_ctx *nt)
        if (!nt->link_is_up)
                cancel_delayed_work_sync(&nt->link_work);
 
+       for (i = 0; i < nt->mw_count; i++)
+               ntb_free_mw(nt, i);
+
        /* The scratchpad registers keep the values if the remote side
         * goes down, blast them now to give them a sane value the next
         * time they are accessed