staging: octeon: Remove explicit NULL comparison
authorMuhammad Falak R Wani <falakreyaz@gmail.com>
Mon, 19 Oct 2015 19:27:39 +0000 (00:57 +0530)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sun, 25 Oct 2015 02:28:52 +0000 (19:28 -0700)
Remove the explicit NULL comparison and rewrite in a compact form.

Signed-off-by: Muhammad Falak R Wani <falakreyaz@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/octeon/ethernet-tx.c

index 3a5d8f5..c053c4a 100644 (file)
@@ -549,7 +549,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++;