staging: netlogic: Fix comparison to NULL
authorLaura Garcia Liebana <nevola@gmail.com>
Wed, 17 Feb 2016 08:52:06 +0000 (09:52 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 20 Feb 2016 22:59:37 +0000 (14:59 -0800)
Avoid the use of comparison to NULL, use !<variable> instead. Checkpatch
detected these issues.

Signed-off-by: Laura Garcia Liebana <nevola@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/netlogic/xlr_net.c

index cd66dd1cb39cd66ce42187b7729dac0c7246e7bf..6732f978f0265395f0495fa6e3df123e207bf063 100644 (file)
@@ -146,7 +146,7 @@ static void xlr_net_fmn_handler(int bkt, int src_stnid, int size, int code,
                addr = addr - MAC_SKB_BACK_PTR_SIZE;
                skb = (struct sk_buff *)(*(unsigned long *)addr);
                skb->dev = adapter->netdev[port];
-               if (skb->dev == NULL)
+               if (!skb->dev)
                        return;
                ndev = skb->dev;
                priv = netdev_priv(ndev);
@@ -1052,7 +1052,7 @@ static int xlr_net_probe(struct platform_device *pdev)
                adapter->netdev[port] = ndev;
 
                res = platform_get_resource(pdev, IORESOURCE_IRQ, port);
-               if (res == NULL) {
+               if (!res) {
                        pr_err("No irq resource for MAC %d\n", priv->port_id);
                        err = -ENODEV;
                        goto err_gmac;