diff --git a/drivers/net/ethernet/mscc/ocelot_ace.c b/drivers/net/ethernet/mscc/ocelot_ace.c index f74b98f7d8d13471a4ab33a4ca629e5efabc6713..39aca1ab46878330e60a939550dc7e52089eb8b3 100644 --- a/drivers/net/ethernet/mscc/ocelot_ace.c +++ b/drivers/net/ethernet/mscc/ocelot_ace.c @@ -105,7 +105,6 @@ static void vcap_cmd(struct ocelot *oc, u16 ix, int cmd, int sel) u32 value = (S2_CORE_UPDATE_CTRL_UPDATE_CMD(cmd) | S2_CORE_UPDATE_CTRL_UPDATE_ADDR(ix) | S2_CORE_UPDATE_CTRL_UPDATE_SHOT); - int rc; if ((sel & VCAP_SEL_ENTRY) && ix >= vcap_is2.entry_count) return; @@ -120,7 +119,7 @@ static void vcap_cmd(struct ocelot *oc, u16 ix, int cmd, int sel) value |= S2_CORE_UPDATE_CTRL_UPDATE_CNT_DIS; ocelot_write(oc, value, S2_CORE_UPDATE_CTRL); - rc = readx_poll_timeout(vcap_s2_read_update_ctrl, oc, value, + readx_poll_timeout(vcap_s2_read_update_ctrl, oc, value, (value & S2_CORE_UPDATE_CTRL_UPDATE_SHOT) == 0, 10, 100000); }