From nobody Tue Oct 7 07:05:38 2025 Received: from szxga05-in.huawei.com (szxga05-in.huawei.com [45.249.212.191]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id DB88280B; Sat, 12 Jul 2025 09:06:33 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=45.249.212.191 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1752311197; cv=none; b=FA/Q3pfwml2ilWK3JHPnJgUAeNfd5rfar2/BfN7BFH4M1o8tV2muRXrB+Mlo4acZHTb2gnwvvNsTHmUypz75aNmbdbIElnCyWNpVyrK19Jc8c6V+1uXryqA0zDG6u+buRgAo7E2U1Z+o7sxlUKx8zSePxvR+BJLxgBo2OqabD70= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1752311197; c=relaxed/simple; bh=tQCbXV1244LalYlPbpsFgDfSuhBQeqb37G3vQc2I3xU=; h=From:To:CC:Subject:Date:Message-ID:MIME-Version:Content-Type; b=mFKYfe8yRjYYR/+m26wufYwBW/wSE0e99A9gIjE97yZZazU2uCFDi0AKZHWmqVxy+WGw08QIRYkqBWazhWOlKpsJrnb/nOKhn4Id2MOYChJtsiwyzY+4vx23h/HEZJsgm4jECLtkTCjBfsPvZWNnEgT6gID7HvzYp3uWZox1xH4= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=huawei.com; spf=pass smtp.mailfrom=huawei.com; arc=none smtp.client-ip=45.249.212.191 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=huawei.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=huawei.com Received: from mail.maildlp.com (unknown [172.19.163.17]) by szxga05-in.huawei.com (SkyGuard) with ESMTP id 4bfN0q2sLnz1V44K; Sat, 12 Jul 2025 17:03:39 +0800 (CST) Received: from dggpemf500002.china.huawei.com (unknown [7.185.36.57]) by mail.maildlp.com (Postfix) with ESMTPS id E60D91A0188; Sat, 12 Jul 2025 17:06:14 +0800 (CST) Received: from huawei.com (10.175.124.27) by dggpemf500002.china.huawei.com (7.185.36.57) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1544.11; Sat, 12 Jul 2025 17:06:13 +0800 From: Yue Haibing To: , , , , , , CC: , , Subject: [PATCH net-next] ipv6: mcast: Remove unnecessary null check in mld_del_delrec() Date: Sat, 12 Jul 2025 17:28:11 +0800 Message-ID: <20250712092811.2992283-1-yuehaibing@huawei.com> X-Mailer: git-send-email 2.34.1 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-ClientProxiedBy: kwepems500001.china.huawei.com (7.221.188.70) To dggpemf500002.china.huawei.com (7.185.36.57) Content-Type: text/plain; charset="utf-8" These is no need to check null for pmc twice. Signed-off-by: Yue Haibing --- net/ipv6/mcast.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/net/ipv6/mcast.c b/net/ipv6/mcast.c index 6c875721d423..f3dae72aa9d3 100644 --- a/net/ipv6/mcast.c +++ b/net/ipv6/mcast.c @@ -794,9 +794,7 @@ static void mld_del_delrec(struct inet6_dev *idev, stru= ct ifmcaddr6 *im) rcu_assign_pointer(pmc_prev->next, pmc->next); else rcu_assign_pointer(idev->mc_tomb, pmc->next); - } =20 - if (pmc) { im->idev =3D pmc->idev; if (im->mca_sfmode =3D=3D MCAST_INCLUDE) { tomb =3D rcu_replace_pointer(im->mca_tomb, --=20 2.34.1