staging: octeon: Remove explicit NULL comparison
PATCH 1/2 staging: octeon: Remove explicit NULL comparison
Remove the explicit NULL comparison and rewrite in a compact form.
Signed-off-by Muhammad Falak R Wani <[email protected]>
--- drivers/staging/octeon/ethernet.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/staging/octeon/ethernet.c +1 -1
@@ -634,7 +634,7 @@ static int cvm_oct_probe(struct platform_device *pdev) } cvm_oct_poll_queue =create_singlethread_workqueue ("octeon-ethernet" ); -if (cvm_oct_poll_queue ==NULL ) { +if (!cvm_oct_poll_queue) {pr_err ("octeon-ethernet: Cannot create workqueue" );return -ENOMEM ; }
Signature · 1 line
1.9.1
PATCH 2/2 staging: octeon: Remove explicit NULL comparison
Remove the explicit NULL comparison and rewrite in a compact form.
Signed-off-by Muhammad Falak R Wani <[email protected]>
--- drivers/staging/octeon/ethernet-tx.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/staging/octeon/ethernet-tx.c +1 -1
@@ -563,7 +563,7 @@ int cvm_oct_xmit_pow(struct sk_buff *skb, struct net_device *dev)/* Get a work queue entry */ cvmx_wqe_t *work =cvmx_fpa_alloc (CVMX_FPA_WQE_POOL ); -if (unlikely (work ==NULL )) { +if (unlikely (!work)) {printk_ratelimited ("%s: Failed to allocate a work queue entry\n" , dev->name); priv->stats.tx_dropped++;
Signature · 1 line
1.9.1