Commit 4b032eb7 authored by Laura Garcia Liebana's avatar Laura Garcia Liebana Committed by Greg Kroah-Hartman

staging: netlogic: Fix comparison to NULL

Avoid the use of comparison to NULL, use !<variable> instead. Checkpatch
detected these issues.
Signed-off-by: default avatarLaura Garcia Liebana <nevola@gmail.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent a5cecac6
...@@ -146,7 +146,7 @@ static void xlr_net_fmn_handler(int bkt, int src_stnid, int size, int code, ...@@ -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; addr = addr - MAC_SKB_BACK_PTR_SIZE;
skb = (struct sk_buff *)(*(unsigned long *)addr); skb = (struct sk_buff *)(*(unsigned long *)addr);
skb->dev = adapter->netdev[port]; skb->dev = adapter->netdev[port];
if (skb->dev == NULL) if (!skb->dev)
return; return;
ndev = skb->dev; ndev = skb->dev;
priv = netdev_priv(ndev); priv = netdev_priv(ndev);
...@@ -1052,7 +1052,7 @@ static int xlr_net_probe(struct platform_device *pdev) ...@@ -1052,7 +1052,7 @@ static int xlr_net_probe(struct platform_device *pdev)
adapter->netdev[port] = ndev; adapter->netdev[port] = ndev;
res = platform_get_resource(pdev, IORESOURCE_IRQ, port); 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); pr_err("No irq resource for MAC %d\n", priv->port_id);
err = -ENODEV; err = -ENODEV;
goto err_gmac; goto err_gmac;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment