liquidio: clear the correct memory
authorDan Carpenter <dan.carpenter@oracle.com>
Mon, 3 Apr 2017 18:18:27 +0000 (21:18 +0300)
committerDavid S. Miller <davem@davemloft.net>
Wed, 5 Apr 2017 13:53:42 +0000 (06:53 -0700)
There is a cut and paste bug here so we accidentally clear the first
few bytes of "resp" a second time instead clearing "ctx".

Fixes: 50c0add534d2 ("liquidio: refactor interrupt moderation code")
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Acked-by: Felix Manlunas <felix.manlunas@cavium.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/cavium/liquidio/lio_ethtool.c

index fac02ed2c44942bb81f544f5274292a68a67f279..dab10c7e4443df10c702898e23c198965b7a5b38 100644 (file)
@@ -1359,7 +1359,7 @@ static int octnet_get_intrmod_cfg(struct lio *lio,
        memset(resp, 0, sizeof(struct oct_intrmod_resp));
 
        ctx = (struct oct_intrmod_context *)sc->ctxptr;
-       memset(resp, 0, sizeof(struct oct_intrmod_context));
+       memset(ctx, 0, sizeof(struct oct_intrmod_context));
        WRITE_ONCE(ctx->cond, 0);
        ctx->octeon_id = lio_get_device_id(oct_dev);
        init_waitqueue_head(&ctx->wc);