From nobody Tue Jan 24 22:14:24 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 4P1h8d5NXNz3bgnD; Tue, 24 Jan 2023 22:14:25 +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 4P1h8d1LXbz3LZx; Tue, 24 Jan 2023 22:14:25 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1674598465; 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=/UcubLNqm+OsaW7w2ILsWVqyaS3+ZrnA4zD7ABot7rA=; b=t/ZlYDsGdcXSUIyIxSUMdwWO5bgn5jCXP/1ZycJmveCEEAQgNcC+ITvEjOsky3uom5V03Y 5ZUmuGfNxR+RAspHAOGN76YECTKIUn8iaU6DbcViF4oL4nvEjpcyMXotd2SaN9dWHjML85 r/WCJBIV4thI9DjWpwrx4WUuEQRl+tvyA/1jkliHKgRfaymIA8B+Z1vdbekp9ix9XB+QPZ 6hLcsdQrOH2tHfD4/75T4+uxE8vYxgU3CeFJIUOY69sG4Yeay1iCrLMvdQk+F0cxGEbn1b M0iIScICXAVvUWZKKNSCaJvho7mVTA4YL/Tt4dBZtRTQRdtwMTSn1oVle2tuoA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1674598465; 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=/UcubLNqm+OsaW7w2ILsWVqyaS3+ZrnA4zD7ABot7rA=; b=fVzZkTC8of6ccelDPUSWp9c3oxZxJM9ramwydNCIQ9gNsrMgaM2HCsaL6e+IEKYCTp32Dt E/W9Cr3IlR18hOYEqukhcmC6ziuslIRLKyyu/4wChuVJ2JFgzNgXssduqqsy2H303Jvb4D 6VPDgWP9vk3rWSJSTanDxDpAl51l0nldYWMn9/zvgUBSa2jJ4CqYfuL/zRudWmnvEgN+OC ozQhhxoqzLhgjREsWMIqB5fJFiKq54OzReZgGjG0P3N/1Q403dQ90Og3TtTp97UdgHzTP0 iugfE+0G5Fqr03AXLmh6vZAifYGOQNFYwuJynx7YXKlHkWTgPMOKn0z9E65z7Q== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1674598465; a=rsa-sha256; cv=none; b=WLy4xXLZkzhdsU3wr1sZm4SI3AqbkAviel5CM32m+St2+/5Y/c8L7ZVNweHoid2N/CGtv5 /zG1yeroaECcz3WQ44D2DNWKRd9Q1+uompfY4z+cqcXGKSnjHbNu7tNsHUkfBBhD/nWaUj QL6WuuCjVe9EplqARRfd01ZEPpLyIkOvUVHUHNi2zV6DvCvt+WyGbHBrQHTBScikps/RKO oCyDa7pIQfVmaTx6k+i4b+48F7jwvw9ZoPtTBfpmzz5kLEzd5oKtgVyGHbkYtiD2NRbDua Ps6yrWZ6rPVinrfTiBsxyivKphU6+W8UB13K7A1aD0TXvrSfqlvVxwkHMVdvXQ== 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 4P1h8d0P7FzQfg; Tue, 24 Jan 2023 22:14:25 +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 30OMEOhl089789; Tue, 24 Jan 2023 22:14:24 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 30OMEOeO089788; Tue, 24 Jan 2023 22:14:24 GMT (envelope-from git) Date: Tue, 24 Jan 2023 22:14:24 GMT Message-Id: <202301242214.30OMEOeO089788@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Warner Losh Subject: git: 2f7b00be106f - stable/13 - stand/ofw: dev can't be NULL here 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: imp X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 2f7b00be106ff560656c638bf44c6b92f1d823d8 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=2f7b00be106ff560656c638bf44c6b92f1d823d8 commit 2f7b00be106ff560656c638bf44c6b92f1d823d8 Author: Warner Losh AuthorDate: 2023-01-13 21:19:39 +0000 Commit: Warner Losh CommitDate: 2023-01-24 21:49:46 +0000 stand/ofw: dev can't be NULL here dev can't be NULL here. ofw_common_parsedev is always called via devparse (indirectly through dv_parsedev() calls there which call it with the args unchanged). In the past, ofw_getdev could call us with NULL pointer for the parse-only case, but that's now all handled inside of devparse for simplicity. Sponsored by: Netflix Reviewed by: kevans Differential Revision: https://reviews.freebsd.org/D38041 (cherry picked from commit d38d8a4c4e9a3c4667307ac2163007ff193040b0) --- stand/libofw/devicename.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/stand/libofw/devicename.c b/stand/libofw/devicename.c index 76ba5530520c..510fe9d92ec1 100644 --- a/stand/libofw/devicename.c +++ b/stand/libofw/devicename.c @@ -108,8 +108,7 @@ ofw_common_parsedev(struct devdesc **dev, const char *devspec, const char **path }; strlcpy(idev->d_path, devspec, min(rem_path - devspec + 1, sizeof(idev->d_path))); - if (dev != NULL) - *dev = &idev->dd; + *dev = &idev->dd; if (path != NULL) *path = rem_path; return 0;