summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorXu Rao <raoxu@uniontech.com>2026-08-12 17:46:32 +0800
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2026-08-14 10:49:43 +0900
commit10ff55ff552b3bf1dadba03fcc430ea205fa2761 (patch)
tree638960a11655b077534e352b697e71204ba77110
parent0dd68b5d01d022fc9c5e71c82a82b0a94d3d0671 (diff)
downloadlinux-10ff55ff552b3bf1dadba03fcc430ea205fa2761.tar.gz
linux-10ff55ff552b3bf1dadba03fcc430ea205fa2761.zip
usb: typec: hd3ss3220: fix VBUS regulator error message
hd3ss3220_regulator_control() enables the VBUS regulator when @on is true and disables it when @on is false. However, its error message uses the opposite operation name, so an enable failure is reported as a disable failure and vice versa. Print the operation that was actually attempted. Reporting the opposite regulator operation on failures can mislead debugging of VBUS problems. Fixes: 27fbc19e52b9 ("usb: typec: hd3ss3220: Enable VBUS based on role state") Cc: stable@vger.kernel.org Reviewed-by: Heikki Krogerus <heikki.krogerus@linux.intel.com> Signed-off-by: Xu Rao <raoxu@uniontech.com> Link: https://patch.msgid.link/7A42A287B2B588D0+20260812094632.348581-1-raoxu@uniontech.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-rw-r--r--drivers/usb/typec/hd3ss3220.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/usb/typec/hd3ss3220.c b/drivers/usb/typec/hd3ss3220.c
index 3e39b800e6b5..d0de5a2488f9 100644
--- a/drivers/usb/typec/hd3ss3220.c
+++ b/drivers/usb/typec/hd3ss3220.c
@@ -218,7 +218,7 @@ static void hd3ss3220_regulator_control(struct hd3ss3220 *hd3ss3220, bool on)
if (ret)
dev_err(hd3ss3220->dev,
- "vbus regulator %s failed: %d\n", on ? "disable" : "enable", ret);
+ "vbus regulator %s failed: %d\n", on ? "enable" : "disable", ret);
}
static void hd3ss3220_set_role(struct hd3ss3220 *hd3ss3220)