Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 18edc84c authored by Divy Le Ray's avatar Divy Le Ray Committed by David S. Miller
Browse files

cxgb3: fix device opening error path



Only negative return from bind_qsets() should be considered an error and
propagated.
It fixes an issue reported by IBM on P Series platform.

Signed-off-by: default avatarDivy Le Ray <divy@chelsio.com>
Tested-by: default avatarNishanth Aravamudan <nacc@us.ibm.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent e341b2dd
Loading
Loading
Loading
Loading
+5 −3
Original line number Original line Diff line number Diff line
@@ -1266,11 +1266,13 @@ static int cxgb_up(struct adapter *adap)
	}
	}


	if (!(adap->flags & QUEUES_BOUND)) {
	if (!(adap->flags & QUEUES_BOUND)) {
		err = bind_qsets(adap);
		int ret = bind_qsets(adap);
		if (err) {

			CH_ERR(adap, "failed to bind qsets, err %d\n", err);
		if (ret < 0) {
			CH_ERR(adap, "failed to bind qsets, err %d\n", ret);
			t3_intr_disable(adap);
			t3_intr_disable(adap);
			free_irq_resources(adap);
			free_irq_resources(adap);
			err = ret;
			goto out;
			goto out;
		}
		}
		adap->flags |= QUEUES_BOUND;
		adap->flags |= QUEUES_BOUND;