From: Konrad Dybcio Date: Thu, 23 Oct 2025 08:13:42 +0000 (+0200) Subject: usb: typec: ps883x: Fix missing mutex_unlock() X-Git-Tag: v6.19-rc1~63^2~76 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=d227a8b3e715963b7c034971c3b467d5430a2cab;p=thirdparty%2Flinux.git usb: typec: ps883x: Fix missing mutex_unlock() There's a missing mutex_unlock() in the error-return path inside ps883x_sw_set(). Simply delete that return since there's another one 3 lines below. Fixes: f83cb615cb7a ("usb: typec: ps883x: Cache register settings, not Type-C mode") Reported-by: kernel test robot Reported-by: Dan Carpenter Closes: https://lore.kernel.org/r/202510231023.aJ09O6pk-lkp@intel.com/ Signed-off-by: Konrad Dybcio Link: https://patch.msgid.link/20251023-topic-ps883x_fixup-v1-1-2afb5b85f09b@oss.qualcomm.com Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/usb/typec/mux/ps883x.c b/drivers/usb/typec/mux/ps883x.c index 7c61629b36d65..5f2879749769e 100644 --- a/drivers/usb/typec/mux/ps883x.c +++ b/drivers/usb/typec/mux/ps883x.c @@ -192,10 +192,8 @@ static int ps883x_sw_set(struct typec_switch_dev *sw, ret = regmap_assign_bits(retimer->regmap, REG_USB_PORT_CONN_STATUS_0, CONN_STATUS_0_ORIENTATION_REVERSED, orientation == TYPEC_ORIENTATION_REVERSE); - if (ret) { + if (ret) dev_err(&retimer->client->dev, "failed to set orientation: %d\n", ret); - return ret; - } } mutex_unlock(&retimer->lock);