summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>2025-12-23 17:57:16 +0300
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2025-12-23 17:57:16 +0300
commitdf3e3169303f7084db3990c999701934af0c04c0 (patch)
treedfe29ea9518b82dbca7fdd0ed292e03c63371c90 /drivers
parent0dc580d4a6518b539cbb2877dd9b283df14aac6f (diff)
downloadlinux-df3e3169303f7084db3990c999701934af0c04c0.tar.xz
Revert "usb: typec: ucsi: Fix null pointer dereference in ucsi_sync_control_common"
This reverts commit 14ad4c10d5bdd413ff9a914260e89b5f54b7a2c7. The originally offending commit will be reverted instead of this fix up at this point in time, so revert this fix. Cc: Heikki Krogerus <heikki.krogerus@linux.intel.com> Cc: Mario Limonciello (AMD) <superm1@kernel.org> Cc: stable <stable@kernel.org> Cc: Johan Hovold <johan@kernel.org> Fixes: 14ad4c10d5bd ("usb: typec: ucsi: Fix null pointer dereference in ucsi_sync_control_common") Link: https://lore.kernel.org/r/20251222152204.2846-1-johan@kernel.org Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/usb/typec/ucsi/ucsi.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/usb/typec/ucsi/ucsi.c b/drivers/usb/typec/ucsi/ucsi.c
index 7129973f19e7..9b3df776137a 100644
--- a/drivers/usb/typec/ucsi/ucsi.c
+++ b/drivers/usb/typec/ucsi/ucsi.c
@@ -97,7 +97,7 @@ out_clear_bit:
if (!ret && cci)
ret = ucsi->ops->read_cci(ucsi, cci);
- if (!ret && cci && ucsi->message_in_size > 0 &&
+ if (!ret && ucsi->message_in_size > 0 &&
(*cci & UCSI_CCI_COMMAND_COMPLETE))
ret = ucsi->ops->read_message_in(ucsi, ucsi->message_in,
ucsi->message_in_size);