]> www.infradead.org Git - users/jedix/linux-maple.git/commit
usb: typec: ucsi: Don't truncate the reads
authorHeikki Krogerus <heikki.krogerus@linux.intel.com>
Fri, 16 Aug 2024 13:58:55 +0000 (16:58 +0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 23 Aug 2024 10:47:38 +0000 (18:47 +0800)
commit1d05c382ddb4e43ce251a50f308df5e42a2f6088
treee690b2a63ddbb8c6dc3672233e61c9d93a35c84d
parent9ecf52153b6f6681853b60c9912231e03857dff4
usb: typec: ucsi: Don't truncate the reads

That may silently corrupt the data. Instead, failing attempts
to read more than the interface can handle.

Signed-off-by: Heikki Krogerus <heikki.krogerus@linux.intel.com>
Reviewed-by: Abhishek Pandit-Subedi <abhishekpandit@chromium.org>
Link: https://lore.kernel.org/r/20240816135859.3499351-3-heikki.krogerus@linux.intel.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/usb/typec/ucsi/ucsi.c
drivers/usb/typec/ucsi/ucsi.h