From: Brian King <brking@linux.vnet.ibm.com>
Subject: ibmveth: Fix oops on request_irq failure
Patch-mainline: 3.1-rc9
Git-commit: 95de86cf5162f78bc5aea80d1a9e5a248196ffaf
References: bnc#719943

If request_irq fails, the ibmveth driver will overwrite
the rc and end up returning a successful rc on its open
function, resulting in an oops later when a packet gets
sent and buffers are not allocated due to the failed open.

Signed-off-by: Brian King <brking@linux.vnet.ibm.com>
Acked-by: Torsten Duwe <duwe@suse.de>

---

 drivers/net/ibmveth.c |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff -puN drivers/net/ibmveth.c~ibmveth_bounce_oops2 drivers/net/ibmveth.c
--- linux-3.0.4-0.13/drivers/net/ibmveth.c~ibmveth_bounce_oops2	2011-09-23 09:37:12.000000000 -0500
+++ linux-3.0.4-0.13-bjking1/drivers/net/ibmveth.c	2011-09-23 09:38:16.000000000 -0500
@@ -630,8 +630,8 @@ static int ibmveth_open(struct net_devic
 		netdev_err(netdev, "unable to request irq 0x%x, rc %d\n",
 			   netdev->irq, rc);
 		do {
-			rc = h_free_logical_lan(adapter->vdev->unit_address);
-		} while (H_IS_LONG_BUSY(rc) || (rc == H_BUSY));
+			lpar_rc = h_free_logical_lan(adapter->vdev->unit_address);
+		} while (H_IS_LONG_BUSY(lpar_rc) || (lpar_rc == H_BUSY));
 
 		goto err_out;
 	}
_
