summaryrefslogtreecommitdiff
path: root/drivers/net/mvpp2.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net/mvpp2.c')
-rw-r--r--drivers/net/mvpp2.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/drivers/net/mvpp2.c b/drivers/net/mvpp2.c
index 184c1f9a46a..f9e979c4d58 100644
--- a/drivers/net/mvpp2.c
+++ b/drivers/net/mvpp2.c
@@ -1722,8 +1722,7 @@ static struct mvpp2_prs_entry *mvpp2_prs_flow_find(struct mvpp2 *priv, int flow)
}
/* Return first free tcam index, seeking from start to end */
-static int mvpp2_prs_tcam_first_free(struct mvpp2 *priv, unsigned char start,
- unsigned char end)
+static int mvpp2_prs_tcam_first_free(struct mvpp2 *priv, int start, int end)
{
int tid;
@@ -2330,7 +2329,7 @@ static int mvpp2_prs_mac_da_accept(struct mvpp2 *priv, int port,
pe = kzalloc(sizeof(*pe), GFP_KERNEL);
if (!pe)
- return -1;
+ return -ENOMEM;
mvpp2_prs_tcam_lu_set(pe, MVPP2_PRS_LU_MAC);
pe->index = tid;
@@ -4735,7 +4734,7 @@ static int phy_info_parse(struct udevice *dev, struct mvpp2_port *port)
int port_node = dev_of_offset(dev);
int phy_node;
u32 id;
- u32 phyaddr = 0;
+ int phyaddr = 0;
int fixed_link = 0;
int ret;
@@ -5354,7 +5353,7 @@ static int mvpp2_probe(struct udevice *dev)
} else {
port->gop_id = fdtdec_get_int(gd->fdt_blob, dev_of_offset(dev),
"gop-port-id", -1);
- if (port->id == -1) {
+ if (port->gop_id == -1) {
dev_err(dev, "missing gop-port-id value\n");
return -EINVAL;
}