diff options
author | Szymon Janc <szymon@janc.net.pl> | 2010-11-27 03:39:46 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2010-11-28 21:06:58 -0500 |
commit | 34cf97eb255b09751f1eb1b5573813e9ea3fe21f (patch) | |
tree | d333a336d1e657b07b9a3bad8a1a45a21106b8c4 /drivers/net/forcedeth.c | |
parent | 5504e1397cc860e61fbb68c56e7a10db613275fd (diff) |
forcedeth: do not use assignment in if conditions
Signed-off-by: Szymon Janc <szymon@janc.net.pl>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/forcedeth.c')
-rw-r--r-- | drivers/net/forcedeth.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/drivers/net/forcedeth.c b/drivers/net/forcedeth.c index 8deae909bbda..2f092d75d78e 100644 --- a/drivers/net/forcedeth.c +++ b/drivers/net/forcedeth.c | |||
@@ -3789,7 +3789,8 @@ static int nv_request_irq(struct net_device *dev, int intr_test) | |||
3789 | if (np->msi_flags & NV_MSI_X_CAPABLE) { | 3789 | if (np->msi_flags & NV_MSI_X_CAPABLE) { |
3790 | for (i = 0; i < (np->msi_flags & NV_MSI_X_VECTORS_MASK); i++) | 3790 | for (i = 0; i < (np->msi_flags & NV_MSI_X_VECTORS_MASK); i++) |
3791 | np->msi_x_entry[i].entry = i; | 3791 | np->msi_x_entry[i].entry = i; |
3792 | if ((ret = pci_enable_msix(np->pci_dev, np->msi_x_entry, (np->msi_flags & NV_MSI_X_VECTORS_MASK))) == 0) { | 3792 | ret = pci_enable_msix(np->pci_dev, np->msi_x_entry, (np->msi_flags & NV_MSI_X_VECTORS_MASK)); |
3793 | if (ret == 0) { | ||
3793 | np->msi_flags |= NV_MSI_X_ENABLED; | 3794 | np->msi_flags |= NV_MSI_X_ENABLED; |
3794 | if (optimization_mode == NV_OPTIMIZATION_MODE_THROUGHPUT && !intr_test) { | 3795 | if (optimization_mode == NV_OPTIMIZATION_MODE_THROUGHPUT && !intr_test) { |
3795 | /* Request irq for rx handling */ | 3796 | /* Request irq for rx handling */ |
@@ -3841,7 +3842,8 @@ static int nv_request_irq(struct net_device *dev, int intr_test) | |||
3841 | } | 3842 | } |
3842 | } | 3843 | } |
3843 | if (ret != 0 && np->msi_flags & NV_MSI_CAPABLE) { | 3844 | if (ret != 0 && np->msi_flags & NV_MSI_CAPABLE) { |
3844 | if ((ret = pci_enable_msi(np->pci_dev)) == 0) { | 3845 | ret = pci_enable_msi(np->pci_dev); |
3846 | if (ret == 0) { | ||
3845 | np->msi_flags |= NV_MSI_ENABLED; | 3847 | np->msi_flags |= NV_MSI_ENABLED; |
3846 | dev->irq = np->pci_dev->irq; | 3848 | dev->irq = np->pci_dev->irq; |
3847 | if (request_irq(np->pci_dev->irq, handler, IRQF_SHARED, dev->name, dev) != 0) { | 3849 | if (request_irq(np->pci_dev->irq, handler, IRQF_SHARED, dev->name, dev) != 0) { |