lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [day] [month] [year] [list]
Message-ID: <20220927121807.2471422-1-waynec@nvidia.com>
Date:   Tue, 27 Sep 2022 20:18:07 +0800
From:   Wayne Chang <waynec@...dia.com>
To:     <heikki.krogerus@...ux.intel.com>, <gregkh@...uxfoundation.org>
CC:     <quic_linyyuan@...cinc.com>, <quic_jackp@...cinc.com>,
        <saranya.gopal@...el.com>, <tiwai@...e.de>,
        <linux-usb@...r.kernel.org>, <linux-kernel@...r.kernel.org>,
        <waynec@...dia.com>, <stable@...r.kernel.org>
Subject: [PATCH 1/1] usb: typec: ucsi: Don't warn on probe deferral

Deferred probe is an expected return value for fwnode_usb_role_switch_get().
Given that the driver deals with it properly, there's no need to output a
warning that may potentially confuse users.

Fixes: 3c162511530c ("usb: typec: ucsi: Wait for the USB role switches")
Cc: stable@...r.kernel.org
Signed-off-by: Wayne Chang <waynec@...dia.com>
---
 drivers/usb/typec/ucsi/ucsi.c | 7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)

diff --git a/drivers/usb/typec/ucsi/ucsi.c b/drivers/usb/typec/ucsi/ucsi.c
index 7f2624f42724..45a4374e9baa 100644
--- a/drivers/usb/typec/ucsi/ucsi.c
+++ b/drivers/usb/typec/ucsi/ucsi.c
@@ -1069,11 +1069,10 @@ static int ucsi_register_port(struct ucsi *ucsi, int index)
 
 	cap->fwnode = ucsi_find_fwnode(con);
 	con->usb_role_sw = fwnode_usb_role_switch_get(cap->fwnode);
-	if (IS_ERR(con->usb_role_sw)) {
-		dev_err(ucsi->dev, "con%d: failed to get usb role switch\n",
+	if (IS_ERR(con->usb_role_sw))
+		return dev_err_probe(ucsi->dev, PTR_ERR(con->usb_role_sw),
+			"con%d: failed to get usb role switch\n",
 			con->num);
-		return PTR_ERR(con->usb_role_sw);
-	}
 
 	/* Delay other interactions with the con until registration is complete */
 	mutex_lock(&con->lock);
-- 
2.25.1

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ