forcedeth: do not use assignment in if conditions
authorSzymon Janc <szymon@janc.net.pl>
Sat, 27 Nov 2010 08:39:46 +0000 (08:39 +0000)
committerDavid S. Miller <davem@davemloft.net>
Mon, 29 Nov 2010 02:06:58 +0000 (18:06 -0800)
Signed-off-by: Szymon Janc <szymon@janc.net.pl>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/forcedeth.c

index 8deae909bbdabedf6970772fccbffe9bb7f595cb..2f092d75d78ee0c5fa2e219417af16f263f6e4f9 100644 (file)
@@ -3789,7 +3789,8 @@ static int nv_request_irq(struct net_device *dev, int intr_test)
        if (np->msi_flags & NV_MSI_X_CAPABLE) {
                for (i = 0; i < (np->msi_flags & NV_MSI_X_VECTORS_MASK); i++)
                        np->msi_x_entry[i].entry = i;
-               if ((ret = pci_enable_msix(np->pci_dev, np->msi_x_entry, (np->msi_flags & NV_MSI_X_VECTORS_MASK))) == 0) {
+               ret = pci_enable_msix(np->pci_dev, np->msi_x_entry, (np->msi_flags & NV_MSI_X_VECTORS_MASK));
+               if (ret == 0) {
                        np->msi_flags |= NV_MSI_X_ENABLED;
                        if (optimization_mode == NV_OPTIMIZATION_MODE_THROUGHPUT && !intr_test) {
                                /* Request irq for rx handling */
@@ -3841,7 +3842,8 @@ static int nv_request_irq(struct net_device *dev, int intr_test)
                }
        }
        if (ret != 0 && np->msi_flags & NV_MSI_CAPABLE) {
-               if ((ret = pci_enable_msi(np->pci_dev)) == 0) {
+               ret = pci_enable_msi(np->pci_dev);
+               if (ret == 0) {
                        np->msi_flags |= NV_MSI_ENABLED;
                        dev->irq = np->pci_dev->irq;
                        if (request_irq(np->pci_dev->irq, handler, IRQF_SHARED, dev->name, dev) != 0) {