]> git.proxmox.com Git - mirror_ubuntu-focal-kernel.git/commitdiff
ibmveth: Fix oops on request_irq failure
authorBrian King <brking@linux.vnet.ibm.com>
Wed, 28 Sep 2011 05:33:43 +0000 (05:33 +0000)
committerDavid S. Miller <davem@davemloft.net>
Thu, 29 Sep 2011 04:32:11 +0000 (00:32 -0400)
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>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ibmveth.c

index 8dd5fccef7252933429d474418fdd712d841dac7..d393f1e764eda89fa4194b8b450eb22b1835afe2 100644 (file)
@@ -636,8 +636,8 @@ static int ibmveth_open(struct net_device *netdev)
                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;
        }