From nobody Wed May 17 09:59:11 2023 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4QLpV74cTNz49vVr; Wed, 17 May 2023 09:59:11 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4QLpV73nYTz41Bn; Wed, 17 May 2023 09:59:11 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1684317551; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=hp+6gCYuVmOvPKVwTcOl2KZ6p4hXCRMJJZW5KJivVow=; b=IS746WFdDqBmD6R3NrrM9ZLURzoKlCa8k3C0Qr83AZhD4FxAQc3VSx9xmQhoaPGWAvTh8b StetusNpZN3nXdteZMd2PJHDu7WHw62lYaUyZKsuudSyEWmALa9y64TfNWuLU+zohUd4RK 9zDxW6uGXDvntJvY6TFBFt+vcMBSsKGp/38Iy82RlN0vNPHXueUGCOcgj34f3AIBAyWP/w EcbxrYmHtq8/a6p9BkeOmMEN6Az+wo57KGEPOMc23Q9NhDwzMUK6O4n42qZpecvfqua8rn VdobzbhqfQDx/9bUi/RUIM0MwEHd/8R2geO74/5Z9F9ylqOylC1u+qWPir2OwA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1684317551; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=hp+6gCYuVmOvPKVwTcOl2KZ6p4hXCRMJJZW5KJivVow=; b=LiZXmb6hAoXPT3vfaKYELRSS4YoK4aiY7wIbOE7kCanikGNLYjFmrvN7rGdXR8M+UEoIiN TaYBvwE3htuIThEchWKj+Ys4VhykQMJOZMVEhOtxzKNH6jwela6xGqExALI0ZEzQ88AttO iDxxNAFhKFACZPfdj7sdvSE2xr++ieasuzv1ncs+GEoL0R27AZIwKBlKy8tOlsgn1upoRr C2r/ouV26SVCRBNR1fRkEY7DhDDG0Q7Y/lBdlvmtIQhxkbq2v91B/Cc8uRTP53x2/DSpM6 T0TNw8ooRln8n0E58vKr/o1xfmZi8FOpZR+cwedF0qNtvg/5q6blvyuNB10Rjw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1684317551; a=rsa-sha256; cv=none; b=fdoqiOYnLnObFcQjwAZCTf5X8xRmFemik6zscUqu+mn9M6h9PL6qjkIwJGzseRe2HJcHqQ bLQFLFCWXUZRWbDH3Oe98nOAXrvIOxamRI6sQdRGObTMhnJRbt3bwUYZ3TcJX9t22gm/2P RjLi9n3tOygEd9IoTz7DFDcMiEZDl5ajM/ori7NK8eCX+QieRYXJkd5h3rGe+KHPEB4bs5 seVJj2F5jRRwTWFZ9DEVbdzsU+yHbYpp8YrqO0UIeYyb5ajxgIcVUr9XIHmsFKCxeSyodQ kSymxal/KorbEum0rQURzk7jKzPIMZicjS7Mqw4ahtbYrqSw4fWxlk1+vooP3Q== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4QLpV72qPWzycY; Wed, 17 May 2023 09:59:11 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 34H9xBIj039288; Wed, 17 May 2023 09:59:11 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 34H9xBJr039287; Wed, 17 May 2023 09:59:11 GMT (envelope-from git) Date: Wed, 17 May 2023 09:59:11 GMT Message-Id: <202305170959.34H9xBJr039287@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Zhenlei Huang Subject: git: f70caf1b4524 - stable/13 - if_stf: Delete unreachable code List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: zlei X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: f70caf1b4524c10d3a747770c69da9d7b6a56a22 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by zlei: URL: https://cgit.FreeBSD.org/src/commit/?id=f70caf1b4524c10d3a747770c69da9d7b6a56a22 commit f70caf1b4524c10d3a747770c69da9d7b6a56a22 Author: Zhenlei Huang AuthorDate: 2023-04-23 04:47:57 +0000 Commit: Zhenlei Huang CommitDate: 2023-05-17 09:57:07 +0000 if_stf: Delete unreachable code As the flag M_WAITOK is passed to ip_encap_attach(), then the function will never return NULL, and the following code within NULL check branch will be unreachable. No functional change intended. Reviewed by: kp Fixes: 6d8fdfa9d5e7d Rework IP encapsulation handling code MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D39746 (cherry picked from commit c373e1d6adbc3785e8f1072cdc4a062733baa514) --- sys/net/if_stf.c | 6 ------ 1 file changed, 6 deletions(-) diff --git a/sys/net/if_stf.c b/sys/net/if_stf.c index d5ffdeabdf53..d0303665d478 100644 --- a/sys/net/if_stf.c +++ b/sys/net/if_stf.c @@ -249,12 +249,6 @@ stf_clone_create(struct if_clone *ifc, char *name, size_t len, caddr_t params) ifp->if_dunit = IF_DUNIT_NONE; sc->encap_cookie = ip_encap_attach(&ipv4_encap_cfg, sc, M_WAITOK); - if (sc->encap_cookie == NULL) { - if_printf(ifp, "attach failed\n"); - free(sc, M_STF); - ifc_free_unit(ifc, unit); - return (ENOMEM); - } ifp->if_mtu = IPV6_MMTU; ifp->if_ioctl = stf_ioctl;