projects
/
kernel
/
kernel-generic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
9c636ba
)
sfc: Avoid assignment in an if-statement, reported by checkpatch
author
Ben Hutchings
<bhutchings@solarflare.com>
Thu, 5 Jan 2012 18:50:29 +0000
(18:50 +0000)
committer
Ben Hutchings
<bhutchings@solarflare.com>
Thu, 5 Jan 2012 18:51:32 +0000
(18:51 +0000)
Fix the following error:
ERROR: do not use assignment in if condition
Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
drivers/net/ethernet/sfc/efx.c
patch
|
blob
|
history
diff --git
a/drivers/net/ethernet/sfc/efx.c
b/drivers/net/ethernet/sfc/efx.c
index
11cc585
..
0539a8d
100644
(file)
--- 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) {