rocker: fix an error code
authorDan Carpenter <dan.carpenter@oracle.com>
Sat, 27 Feb 2016 11:31:43 +0000 (14:31 +0300)
committerDavid S. Miller <davem@davemloft.net>
Sat, 27 Feb 2016 19:06:14 +0000 (14:06 -0500)
We intended to return PTR_ERR() here instead of 1.

Fixes: 1f9993f6825f ('rocker: fix a neigh entry leak issue')
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Acked-by: Jiri Pirko <jiri@mellanox.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/rocker/rocker_ofdpa.c

index 099008a53b038c62ecf406b3cc403fed742d36ff..07218c360d8648f593849d2428c559e2b52298bb 100644 (file)
@@ -1449,7 +1449,7 @@ static int ofdpa_port_ipv4_resolve(struct ofdpa_port *ofdpa_port,
        if (!n) {
                n = neigh_create(&arp_tbl, &ip_addr, dev);
                if (IS_ERR(n))
-                       return IS_ERR(n);
+                       return PTR_ERR(n);
        }
 
        /* If the neigh is already resolved, then go ahead and