From 18edc84cf15cbe114dcdf7e8612ee52586d0aad7 Mon Sep 17 00:00:00 2001 From: Divy Le Ray Date: Mon, 25 Oct 2010 07:35:02 +0000 Subject: 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: Divy Le Ray Tested-by: Nishanth Aravamudan Signed-off-by: David S. Miller --- drivers/net/cxgb3/cxgb3_main.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'drivers') diff --git a/drivers/net/cxgb3/cxgb3_main.c b/drivers/net/cxgb3/cxgb3_main.c index a04ce6a5f637..4e3c12371aae 100644 --- a/drivers/net/cxgb3/cxgb3_main.c +++ b/drivers/net/cxgb3/cxgb3_main.c @@ -1266,11 +1266,13 @@ static int cxgb_up(struct adapter *adap) } if (!(adap->flags & QUEUES_BOUND)) { - err = bind_qsets(adap); - if (err) { - CH_ERR(adap, "failed to bind qsets, err %d\n", err); + int ret = bind_qsets(adap); + + if (ret < 0) { + CH_ERR(adap, "failed to bind qsets, err %d\n", ret); t3_intr_disable(adap); free_irq_resources(adap); + err = ret; goto out; } adap->flags |= QUEUES_BOUND; -- cgit v1.2.3