From nobody Sun Nov 6 00:02:48 2022 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 4N4ZLd0PJ6z4gpbf; Sun, 6 Nov 2022 00:02:49 +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 4N4ZLc6xVTz46CK; Sun, 6 Nov 2022 00:02:48 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1667692969; 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=zYlhG7pNZeIe2WKEphVqj/lpfg0O3JVtYHXLYl6d4WA=; b=CQALRc0FFeeun+Ndf8DsE60917MGgzUig3SyMklqz1Saxrx0nH+KOa42eJBp3reIZRfwUI WmpYcLK8nMz4hwICyWfuCUMsXtml+5sPmtraDcIsoK0gbLMRbTV9MJz5XsQV6qIRmiOEIi 0Ap0BeGExHk5VPJIAh9gsQ4lAkrkj4LQcOCMu5RkovXIKtSVzUjwv9YNmQMjteyrOewOwa BfvXLN2Ypf+JWh3Z3Aeja4DON+mpjNyIQlf/DEWSFqsNhyKwr+xWuhZTOexZZuAWD/240m 41sv68WWBgJ3n8DIYOCg9+828mE2cPJ8A6kHWKWanA/nUDu7BcLHhpkP8z6C2g== 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 4N4ZLc5yzGz11BS; Sun, 6 Nov 2022 00:02:48 +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 2A602mnR068426; Sun, 6 Nov 2022 00:02:48 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 2A602m2I068425; Sun, 6 Nov 2022 00:02:48 GMT (envelope-from git) Date: Sun, 6 Nov 2022 00:02:48 GMT Message-Id: <202211060002.2A602m2I068425@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Justin Hibbits Subject: git: d56c7ac87f9f - main - dpaa: Go to cleanup exit point on fman attach error 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: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jhibbits X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: d56c7ac87f9f0fbbdc415265f56915a824a8112d Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1667692969; 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=zYlhG7pNZeIe2WKEphVqj/lpfg0O3JVtYHXLYl6d4WA=; b=GEDuuP9RMOLYmSnmNjRTyltfRalaSooOe9UKzWPzUdNCUv9FV1ti4VXKeqT3YXLRh/aHrX JJMjhH8nt2EdtLhInB1KOcUVHAm8m/J85oY0eah5463v4/0pPmcQlez/eCN+L3xopgSs6J o9xVVAiSO+WJgPwRMxhedCreIhVTCXqomwHoxYoPntR053cqlK5pEzMiCgrP7a0DSQpOOL JkdW6v1XSd0ntmDl54g45hV7HTyGO0QPxetlKAygVDI7woHhwTDO+Mi0UPLqvPmllpCAjL WykZbEVs2zc9o8TjTqtUSP/K/TS2tTWHe+2//6CYr6zSBfHgFe7BSjeeg/htiA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1667692969; a=rsa-sha256; cv=none; b=lnXA5EPUyYYg6QBRyqmzE3j1nOrQnbRepP2FghgRUlATxVgLFgEppyG9QuOPodKnyC9Oy6 mCIlUJQBCtNw+toXPwDUXzsStWvV+NjiMu/nq14ncabUDQld4IBi89ju3GdNyee8BTUYso MYg461BInfigL4BnEYTPCfQl9WaojWAW7sGYe6ZikpH+64Y8EgDEtUQO/PELkfZ2tlzPuv MY5poFwYuyKndbr73KghPxxQ8ydVZgL2SkhrpDPgd+5oGtax4OLZUd7e/MOiGOKfvOZpPu KgOSmviQEal8ghRJay2xA1i5X2PV74xhm8lKRlk/m4mxxPu5mcaBBXYTKSq9NA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by jhibbits: URL: https://cgit.FreeBSD.org/src/commit/?id=d56c7ac87f9f0fbbdc415265f56915a824a8112d commit d56c7ac87f9f0fbbdc415265f56915a824a8112d Author: Justin Hibbits AuthorDate: 2022-11-06 00:01:50 +0000 Commit: Justin Hibbits CommitDate: 2022-11-06 00:05:24 +0000 dpaa: Go to cleanup exit point on fman attach error If fman_init() fails it can leave things in a state where it cannot attach at all in the future, because it would simply exit without tearing down everything that was already set up. Go to the exit point to clean up on error instead, so that it can try again later. MFC after: 1 week --- sys/dev/dpaa/fman.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/dev/dpaa/fman.c b/sys/dev/dpaa/fman.c index 64709b07fc42..738ad024b90c 100644 --- a/sys/dev/dpaa/fman.c +++ b/sys/dev/dpaa/fman.c @@ -473,7 +473,7 @@ fman_attach(device_t dev) sc->fm_handle = fman_init(sc, &cfg); if (sc->fm_handle == NULL) { device_printf(dev, "could not be configured\n"); - return (ENXIO); + goto err; } return (bus_generic_attach(dev));