Skip to contentSkip to conversation

Staging:octeon:ethernet-rx.c: Fix comparison with constant warning

PATCH In review Muraru Mihaela 2 participants 2 messages Mar 5, 2016 – Mar 11, 2016 Staging

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Staging:octeon:ethernet-rx.c: Fix comparison with constant warning

Fix the comparison with a constant on the left side, by checking if the variable is not null

It also reduce to silence the checkpatch.pl warning.

---
 drivers/staging/octeon/ethernet-rx.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/staging/octeon/ethernet-rx.c +1 -1
index ed55304..b54b0b2 100644
@@ -449,7 +449,7 @@ void cvm_oct_rx_initialize(void)
 		}
 	}
 
-	if (NULL == dev_for_napi)
+	if (!dev_for_napi)
 		panic("No net_devices were allocated.");
 
 	netif_napi_add(dev_for_napi, &cvm_oct_napi, cvm_oct_napi_poll,
Signature · 1 line
1.9.1
maintainer
#1 lore raw
Quoted 9 lines · Muraru Mihaela

Fix the comparison with a constant on the left side, by checking if the variable is not null

It also reduce to silence the checkpatch.pl warning.

---
 drivers/staging/octeon/ethernet-rx.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Does not apply to my tree :(