From nobody Tue Nov 05 01:33:44 2024 X-Original-To: dev-commits-src-all@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 4Xj9pd44XWz5cq1Y; Tue, 05 Nov 2024 01:33:45 +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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Xj9pd0VRnz4tHq; Tue, 5 Nov 2024 01:33:45 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1730770425; 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=TsHsV9oBxDBHQYFSwNpIrJUUuwJ1rIP3Cj7BliJJYR0=; b=RnDLn2baBN+UB6Bf8ZK8W4sToGrKawxDI2XRL9YwdRVhWk9QDyzrsZym5DGnnvSEDl7UjT AGI2mFJXj1BLK3J/pROqd9FVSO3O3hxdiKxJwvzm/uc/NrwOhd1eOivkuJVRmy6zHSKUlA LCirzTzUMkkjknJ28GhPBTK2zBP4KJFT62xTpnCyVStXq4b2cz1IPKsXsYdKR/sDav/mTn AwYlv64JYmkkZrXEd2Q6vRRKsrmSr878LQeHPNTQtE6l/bgmuXtGwVcsqXBFkEgs12RQZF r6m169oAHp6p9KD6ePWGJLW6jcSjtiIz6wi2osjAUoyXn3DWpRv69x1/DjYY0g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1730770425; 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=TsHsV9oBxDBHQYFSwNpIrJUUuwJ1rIP3Cj7BliJJYR0=; b=sEdai2Hh7RtFRnSUoZiFmohPqqfQc8+AbfENwFBSi8rAFZkZVa7ppcWi6w+SeX5Nub4qs3 gotpHNvdigUlaFbLdetGkfguY8RdlpkFR7i/UBr5GY5GceBYOlcSE4wy0VYipkrZORsRQf wPL363/3H4GbDtJGYnlr1UMd+ZwEshNCRjP9x0KlQMRSghqVb2wPk4EEiHFA92rGQ9xP7w 9nDBzTZg4hd3LuXC46SI/RoQBBmtTavEu8dkc8TI2VNsZIAm86JaFI2NRbRUEicWuNsTEV teByIlhd3/aBUxuDpFw+w4UqTIurQNQNPmVABmNfFpc0YuyxT3HHep2Pl2MvHQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1730770425; a=rsa-sha256; cv=none; b=s9TD+VJtb3Kx9sueWhGnjw8Ef+UVF0dDlEcPVdVw5A4wn/7iGbCc6ysyhJSsjf4pmP1lNr r6kTVe6sRACoQbPZyjMJhUswGYwgsQEJy7HNJyqCoidjsm7u2VBkFwS5Cgw03n2GApejQZ WTHIq6dSPWdfWrTQwQod0OoPGKc9tQ8wa7HHcFYmCzHuuCVK4+oQIL+bzuCVID9EfNNP+j SqF8lnHewicR2JpOdasYwwEpJWGBNXGvLDIWQ7mGdnSy/8LAz2CtBf8O0HbE8reXWaYHLF NJxbiHOdAxu32I8WqJT8bE6vLQhYlB1Y9s4Cm4nN/35mPyWOKRDeABZic8bpeQ== 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 4Xj9pc6rxJzwM3; Tue, 5 Nov 2024 01:33:44 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 4A51XiDW049184; Tue, 5 Nov 2024 01:33:44 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4A51Xio5049181; Tue, 5 Nov 2024 01:33:44 GMT (envelope-from git) Date: Tue, 5 Nov 2024 01:33:44 GMT Message-Id: <202411050133.4A51Xio5049181@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: John Baldwin Subject: git: 24d5a8e6eec2 - main - dpaa2_mc: Check for error the first time bus_generic_detach is called List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jhb X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 24d5a8e6eec2b9eed9591971f223d79b8d7044c9 Auto-Submitted: auto-generated The branch main has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=24d5a8e6eec2b9eed9591971f223d79b8d7044c9 commit 24d5a8e6eec2b9eed9591971f223d79b8d7044c9 Author: John Baldwin AuthorDate: 2024-11-05 01:30:53 +0000 Commit: John Baldwin CommitDate: 2024-11-05 01:30:53 +0000 dpaa2_mc: Check for error the first time bus_generic_detach is called This removes the need for the second call. Reviewed by: dsl Differential Revision: https://reviews.freebsd.org/D47388 --- sys/dev/dpaa2/dpaa2_mc.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/sys/dev/dpaa2/dpaa2_mc.c b/sys/dev/dpaa2/dpaa2_mc.c index da8f8a077d6b..c7553e8a514a 100644 --- a/sys/dev/dpaa2/dpaa2_mc.c +++ b/sys/dev/dpaa2/dpaa2_mc.c @@ -281,7 +281,9 @@ dpaa2_mc_detach(device_t dev) struct dpaa2_devinfo *dinfo = NULL; int error; - bus_generic_detach(dev); + error = bus_generic_detach(dev); + if (error != 0) + return (error); sc = device_get_softc(dev); if (sc->rcdev) @@ -292,10 +294,6 @@ dpaa2_mc_detach(device_t dev) if (dinfo) free(dinfo, M_DPAA2_MC); - error = bus_generic_detach(dev); - if (error != 0) - return (error); - return (device_delete_children(dev)); }