Staging: netlogic: Use !x instead of x == NULL
PATCH 1/1 Staging: netlogic: Use !x instead of x == NULL
Avoid to change comparison for devm_ioremap_resource value. Checkpatch detected these issues.
Signed-off-by Dilek Uzulmez <[email protected]>
--- drivers/staging/netlogic/xlr_net.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-)
drivers/staging/netlogic/xlr_net.c +4 -4
@@ -147,7 +147,7 @@ static void xlr_net_fmn_handler(int bkt, int src_stnid, int size, 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);
@@ -878,7 +878,7 @@ static int xlr_setup_mdio(struct xlr_net_priv *priv, priv->mii_bus->write = xlr_mii_write; priv->mii_bus->parent = &pdev->dev; priv->mii_bus->irq =kmalloc (sizeof (int )*PHY_MAX_ADDR ,GFP_KERNEL ); -if (priv->mii_bus->irq ==NULL ) { +if (!priv->mii_bus->irq) {pr_err ("irq alloc failed\n" );mdiobus_free (priv->mii_bus);return -ENOMEM ;
@@ -1037,7 +1037,7 @@ static int xlr_net_probe(struct platform_device *pdev) priv->nd = (struct xlr_net_data *)pdev->dev.platform_data; res =platform_get_resource (pdev,IORESOURCE_MEM , port); -if (res ==NULL ) { +if (!res) {pr_err ("No memory resource for MAC %d\n" , priv->port_id); err = -ENODEV ;
@@ -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;
Signature · 1 line
1.9.1
Greg KH
maintainerQuoted 7 lines · Dilek Uzulmez
Avoid to change comparison for
devm_ioremap_resourcevalue. Checkpatch detected these issues.Signed-off-by Dilek Uzulmez <[email protected]>--- drivers/staging/netlogic/xlr_net.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-)
Doesn't apply to my tree due to changes someone else send before you did :(