diff --git a/net/smc/smc_pnet.c b/net/smc/smc_pnet.c index 21b8bf23e4ee..399314cfab90 100644 --- a/net/smc/smc_pnet.c +++ b/net/smc/smc_pnet.c @@ -749,7 +749,7 @@ static int smc_pnet_add_pnetid(struct net *net, u8 *pnetid) write_lock(&sn->pnetids_ndev.lock); list_for_each_entry(pi, &sn->pnetids_ndev.list, list) { - if (smc_pnet_match(pnetid, pe->pnetid)) { + if (smc_pnet_match(pnetid, pi->pnetid)) { refcount_inc(&pi->refcnt); kfree(pe); goto unlock;