From nobody Thu Mar 17 14:29:57 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 B515D1A1D621; Thu, 17 Mar 2022 14:29:57 +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 4KK8g93qncz3H6r; Thu, 17 Mar 2022 14:29:57 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1647527397; 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=obbNq/ZO0Z8Ll36vd17ms/wHxnCsvSOfJLHfUiYjB7E=; b=RfhxhB5BOsdU7BpmnRqnlo/DMiOa0VqEnhpnRh23g8XJKYKT4PjUVm2VxBrASl/ODN1k4R movxIfRW2I3IymcI4qBr+YnKtAYZImF1n+4lZdm952R0Fiai01XqGaKK5+n2doxZUxOsZ3 EaEUtnZqHk3kvzXeCI9j2bmAiXv15Ock0IdtAb815+M0TpvFMDopXIjTZZMIddf/hv4tYA oWOp+j2YgRct68Gw9uM5LDg27KBqNUoKK2HP9ptux/Sp5Ej418AXtYINIxmvEzf3u4iqHH exwWo3DdzfhkpEIeeWfFiYnPbafXqCh8YAKCEXTXBmocYiY7HSfF4rWg/x2RAA== 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 5E14C42E5; Thu, 17 Mar 2022 14:29:57 +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 22HETvBD044810; Thu, 17 Mar 2022 14:29:57 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 22HETvPJ044809; Thu, 17 Mar 2022 14:29:57 GMT (envelope-from git) Date: Thu, 17 Mar 2022 14:29:57 GMT Message-Id: <202203171429.22HETvPJ044809@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Hans Petter Selasky Subject: git: 6bce8a35cf0a - main - usb(4): Check return value from bus_generic_get_device_path(). 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: hselasky X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 6bce8a35cf0aa184571e7e7049c1d15873afff30 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1647527397; 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=obbNq/ZO0Z8Ll36vd17ms/wHxnCsvSOfJLHfUiYjB7E=; b=xSyqnMvqpnIA3ttgiHSNvFkGTG0dGgvUpmuEfy8eziguPIjdFcfDLUhDwokE+lbEI9o4qy LnmkFhFcg3CCJGe0kUlWPYvnAwspZrwu+bNEhXMR2B1m8AlD5H3DNHgDv3+6iHCtyDp8T/ yLaaNETgB1zXkfR3tkeQHduxn4Kl8WM6nwEAtjF/NtTm+q8DaSiGM+2KG1g4kCfWisagM2 8RutYPAjY0tEst8CdUf4rpM1BXHmCXJ4mKMe2iz4UeB086Gyg8hzWmXUZNYjnFPaDA7mPY JFXpfbWjZAFJovo3QT12Ea+gBe/32mHVnyA/B9v9yUl5d8qm9HwwarIq+HOrpg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1647527397; a=rsa-sha256; cv=none; b=IkeocMHnNLguQZep+5rLyJ6Pv0Zsc2VlYcnkR00A9bkWj65Kk9oI9Rtj7PMKsquUzetfOh +YkpEvtkmUIY3Ora61LmiXI+7HH58M2EPtiz2UezAqwaXGaZvhWuFr+BYSsIYOdbDurwSm SuqwrUSzfdjJX2Oa8n8UvZ+mZlWOahzeu6BiweDQ65EFA0JFHyGFb9RTeHUmv3x+UF2k7R ukTmu1lUb+rkUbZV/aN3Hty7QBZFvI1KzdKHjO+dJNPzJDBcHZ20aKeHjbpoPhpP4LYRs/ 6hY4rsUyQcISw/HFsC4ErLa6JwARyJ0A9D2Um4fu4KBxBVRY3+UEfoChijv+WQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by hselasky: URL: https://cgit.FreeBSD.org/src/commit/?id=6bce8a35cf0aa184571e7e7049c1d15873afff30 commit 6bce8a35cf0aa184571e7e7049c1d15873afff30 Author: Hans Petter Selasky AuthorDate: 2022-03-17 14:23:46 +0000 Commit: Hans Petter Selasky CommitDate: 2022-03-17 14:27:50 +0000 usb(4): Check return value from bus_generic_get_device_path(). MFC after: 1 week Sponsored by: NVIDIA Networking --- sys/dev/usb/usb_hub.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sys/dev/usb/usb_hub.c b/sys/dev/usb/usb_hub.c index 6cd4cfd37ee4..1e5427a8bddd 100644 --- a/sys/dev/usb/usb_hub.c +++ b/sys/dev/usb/usb_hub.c @@ -1683,6 +1683,8 @@ uhub_get_device_path(device_t bus, device_t child, const char *locator, if (strcmp(locator, BUS_LOCATOR_UEFI) == 0) { rv = bus_generic_get_device_path(device_get_parent(bus), bus, locator, sb); + if (rv != 0) + return (rv); sc = device_get_softc(bus); hub = sc->sc_udev->hub;