diff options
author | Laura Garcia Liebana <nevola@gmail.com> | 2016-02-17 11:52:06 +0300 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2016-02-21 01:59:37 +0300 |
commit | 4b032eb7bd841eb285943d095f2c61e28bbd1c6f (patch) | |
tree | 627cc61c84d6b4ab0f5b315c040511dce024b2fb /drivers/staging/netlogic | |
parent | a5cecac645c7eb18e0c23d6c52662cbe07b6d232 (diff) | |
download | linux-4b032eb7bd841eb285943d095f2c61e28bbd1c6f.tar.xz |
staging: netlogic: Fix comparison to NULL
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>
Diffstat (limited to 'drivers/staging/netlogic')
-rw-r--r-- | drivers/staging/netlogic/xlr_net.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/staging/netlogic/xlr_net.c b/drivers/staging/netlogic/xlr_net.c index cd66dd1cb39c..6732f978f026 100644 --- a/drivers/staging/netlogic/xlr_net.c +++ b/drivers/staging/netlogic/xlr_net.c @@ -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; |