aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/ntb/ntb_transport.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/drivers/ntb/ntb_transport.c b/drivers/ntb/ntb_transport.c
index 4321488d2179..2ef9d9130864 100644
--- a/drivers/ntb/ntb_transport.c
+++ b/drivers/ntb/ntb_transport.c
@@ -829,7 +829,7 @@ static void ntb_transport_link_work(struct work_struct *work)
829 struct pci_dev *pdev = ndev->pdev; 829 struct pci_dev *pdev = ndev->pdev;
830 resource_size_t size; 830 resource_size_t size;
831 u32 val; 831 u32 val;
832 int rc, i, spad; 832 int rc = 0, i, spad;
833 833
834 /* send the local info, in the opposite order of the way we read it */ 834 /* send the local info, in the opposite order of the way we read it */
835 for (i = 0; i < nt->mw_count; i++) { 835 for (i = 0; i < nt->mw_count; i++) {
@@ -899,6 +899,13 @@ static void ntb_transport_link_work(struct work_struct *work)
899out1: 899out1:
900 for (i = 0; i < nt->mw_count; i++) 900 for (i = 0; i < nt->mw_count; i++)
901 ntb_free_mw(nt, i); 901 ntb_free_mw(nt, i);
902
903 /* if there's an actual failure, we should just bail */
904 if (rc < 0) {
905 ntb_link_disable(ndev);
906 return;
907 }
908
902out: 909out:
903 if (ntb_link_is_up(ndev, NULL, NULL) == 1) 910 if (ntb_link_is_up(ndev, NULL, NULL) == 1)
904 schedule_delayed_work(&nt->link_work, 911 schedule_delayed_work(&nt->link_work,