提交 e9e01846 编写于 作者: B Ben Hutchings

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: NBen Hutchings <bhutchings@solarflare.com>
上级 9c636baf
...@@ -1069,9 +1069,11 @@ static int efx_init_io(struct efx_nic *efx) ...@@ -1069,9 +1069,11 @@ static int efx_init_io(struct efx_nic *efx)
* masks event though they reject 46 bit masks. * masks event though they reject 46 bit masks.
*/ */
while (dma_mask > 0x7fffffffUL) { while (dma_mask > 0x7fffffffUL) {
if (pci_dma_supported(pci_dev, dma_mask) && if (pci_dma_supported(pci_dev, dma_mask)) {
((rc = pci_set_dma_mask(pci_dev, dma_mask)) == 0)) rc = pci_set_dma_mask(pci_dev, dma_mask);
if (rc == 0)
break; break;
}
dma_mask >>= 1; dma_mask >>= 1;
} }
if (rc) { if (rc) {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册