From nobody Fri Jun 02 13:17:27 2023 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 4QXk7X1sgyz4YKKh; Fri, 2 Jun 2023 13:17:28 +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 4QXk7X12VKz42CP; Fri, 2 Jun 2023 13:17:28 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1685711848; 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=QU930VJbbpEVyblaY1YTYCUnnNfEnt9HbJOu/cEi7NQ=; b=fG3rA2tDUwXIrE/1hE/vN9MZeGpLlh1Qp2s+2S3hZfyVjdKeZmrSYlROkCt0xsLfqaxWP8 YbFgsxycn7QDFMazYqbfi/VTXuSuUzu9aZt+NHprV+pQV3rVzv8F6hhX9C8ZEU3CrfVUAy vx5RxGI7n3bhd1D2MZa65PzNGVJYwupClV9FNaFgoThRMa39JjmJf3DzR1fqzXDPoyOa0j oWjwC6Q7It20lnlOOb3lTr+Y1rKBTGVyjEi/7l0BExcrCLV+iF/uaf/CQnmmGUnGxYdWeH xEmfcFcxeNd9uQBWUASP1QGQaH/0jwoY2HaG8LM5zXWBYJsdpyCGtZW5STmOHA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1685711848; 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=QU930VJbbpEVyblaY1YTYCUnnNfEnt9HbJOu/cEi7NQ=; b=H4q2SvItVXuXIesMSuKscQca73SBnr2D2VzoNiurUm8+cTogyw7fRkp1Vsuv7UzWLFsHD5 i/6tDtixh+AXRcuTuPKFAtUnk7FtlJD9/KkefJd1nWKVRMJahAnD+xYjxupk8AVkyVZkY6 UFFp+xo49OMo6HmbAb3+fmqgjHGLErf3epNp8XNk823+HcXt18V544zJsielrOPzFVfsyw /SVXgrnIoXXRZE2E8LWCNDh/alHWxdJ6Sf3ipqFVfQxLb61jWEvfXjX+/2jjwCYganMW9s kKz+vaFeTi8/52QknOkboT/SEulUrE0ZOfae80R5a5eGEqGt4wHNUe6UyIB3Wg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1685711848; a=rsa-sha256; cv=none; b=kqunse66mUTmgSvfoM3pHW+A7t7Aib4sM/KQ8GNEnnNX3rjlOPb8WbGCclF9hmKihagBrT QPVTkUxb6WWGYrqIrBzlWQW/fhfQOGgzVDwKnM51opXkw0SOrLsaxY5gt5i6X/jcbtKcnh 8TsF6uup95gc/0NO/adbzh05H284KjORkCygfkUkMRFP2C262f2eQJRpZlAuwsikhZmnDx 2Scmly6aBe7zHGNkkjFvfUUnBfQy/vaVgaZAuhCXfFm8TgG+iJ+1rnS9PqBm/0AbsZEVao Gq9HxIbKEQybkUgypeB6LxJaDTiYW2KCERDkeKhoZ76LrcVmBOe3qVKFUo14LA== 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 4QXk7X059jz1184; Fri, 2 Jun 2023 13:17:28 +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 352DHRnD062794; Fri, 2 Jun 2023 13:17:27 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 352DHReF062793; Fri, 2 Jun 2023 13:17:27 GMT (envelope-from git) Date: Fri, 2 Jun 2023 13:17:27 GMT Message-Id: <202306021317.352DHReF062793@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Mark Johnston Subject: git: 78155442c297 - stable/13 - nexus: Consistently return a pointer in failure paths 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: markj X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 78155442c297272006185a2b3946033ae5d1cd04 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=78155442c297272006185a2b3946033ae5d1cd04 commit 78155442c297272006185a2b3946033ae5d1cd04 Author: Mark Johnston AuthorDate: 2023-04-26 21:19:28 +0000 Commit: Mark Johnston CommitDate: 2023-06-02 13:16:55 +0000 nexus: Consistently return a pointer in failure paths No functional change intended. MFC after: 1 week (cherry picked from commit ca4c7859009549975229d854888231e48938035e) --- sys/arm/arm/nexus.c | 2 +- sys/x86/x86/nexus.c | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/sys/arm/arm/nexus.c b/sys/arm/arm/nexus.c index d0894f3823ef..a0da03a80328 100644 --- a/sys/arm/arm/nexus.c +++ b/sys/arm/arm/nexus.c @@ -256,7 +256,7 @@ nexus_alloc_resource(device_t bus, device_t child, int type, int *rid, if (needactivate) { if (bus_activate_resource(child, type, *rid, rv)) { rman_release_resource(rv); - return (0); + return (NULL); } } diff --git a/sys/x86/x86/nexus.c b/sys/x86/x86/nexus.c index fc3cdc3c24f3..a8a800fd8b32 100644 --- a/sys/x86/x86/nexus.c +++ b/sys/x86/x86/nexus.c @@ -389,13 +389,13 @@ nexus_alloc_resource(device_t bus, device_t child, int type, int *rid, rv = rman_reserve_resource(rm, start, end, count, flags, child); if (rv == NULL) - return (0); + return (NULL); rman_set_rid(rv, *rid); if (needactivate) { if (bus_activate_resource(child, type, *rid, rv)) { rman_release_resource(rv); - return (0); + return (NULL); } }