ionic: fix unchecked reference
authorShannon Nelson <snelson@pensando.io>
Fri, 19 Mar 2021 00:48:06 +0000 (17:48 -0700)
committerDavid S. Miller <davem@davemloft.net>
Fri, 19 Mar 2021 02:16:10 +0000 (19:16 -0700)
We can get to the counter without going through the pointer
that the robot complained about.

Reported-by: kernel test robot <lkp@intel.com>
Signed-off-by: Shannon Nelson <snelson@pensando.io>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/pensando/ionic/ionic_lif.c

index 83ec3c6..18fcba4 100644 (file)
@@ -888,7 +888,7 @@ static int ionic_adminq_napi(struct napi_struct *napi, int budget)
        work_done = max(n_work, a_work);
        if (work_done < budget && napi_complete_done(napi, work_done)) {
                flags |= IONIC_INTR_CRED_UNMASK;
-               lif->adminqcq->cq.bound_intr->rearm_count++;
+               intr->rearm_count++;
        }
 
        if (work_done || flags) {