summaryrefslogtreecommitdiff
path: root/drivers/net/ethernet/sfc/efx.c
diff options
context:
space:
mode:
authorBen Hutchings <bhutchings@solarflare.com>2012-01-05 18:50:29 +0000
committerBen Hutchings <bhutchings@solarflare.com>2012-01-05 18:51:32 +0000
commite9e01846c7e18a3b5682b54e50f1005949737bd9 (patch)
treee83cd43f2f1f978a04ec745c820d73c945b3bd0e /drivers/net/ethernet/sfc/efx.c
parent9c636baf8518d0f986004b40669b75506459beac (diff)
downloadlwn-e9e01846c7e18a3b5682b54e50f1005949737bd9.tar.gz
lwn-e9e01846c7e18a3b5682b54e50f1005949737bd9.zip
sfc: Avoid assignment in an if-statement, reported by checkpatch
Fix the following error: ERROR: do not use assignment in if condition Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
Diffstat (limited to 'drivers/net/ethernet/sfc/efx.c')
-rw-r--r--drivers/net/ethernet/sfc/efx.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/drivers/net/ethernet/sfc/efx.c b/drivers/net/ethernet/sfc/efx.c
index 11cc585c36a4..0539a8d88a23 100644
--- a/drivers/net/ethernet/sfc/efx.c
+++ b/drivers/net/ethernet/sfc/efx.c
@@ -1069,9 +1069,11 @@ static int efx_init_io(struct efx_nic *efx)
* masks event though they reject 46 bit masks.
*/
while (dma_mask > 0x7fffffffUL) {
- if (pci_dma_supported(pci_dev, dma_mask) &&
- ((rc = pci_set_dma_mask(pci_dev, dma_mask)) == 0))
- break;
+ if (pci_dma_supported(pci_dev, dma_mask)) {
+ rc = pci_set_dma_mask(pci_dev, dma_mask);
+ if (rc == 0)
+ break;
+ }
dma_mask >>= 1;
}
if (rc) {