summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2023-04-23 07:46:52 -0700
committerLinus Torvalds <torvalds@linux-foundation.org>2023-04-23 07:46:52 -0700
commitd6b78224c65e395db6aa66ea74522d9899c8aefb (patch)
treec3c973080a82f2fbe19c2634864e9499ed0b42ff
parent622322f53c6d9ddd3c2a4aad852b3e1adbd56da7 (diff)
parent5dc63e56a9cf8df0b59c234a505a1653f1bdf885 (diff)
downloadlinux-d6b78224c65e395db6aa66ea74522d9899c8aefb.tar.gz
linux-d6b78224c65e395db6aa66ea74522d9899c8aefb.tar.bz2
linux-d6b78224c65e395db6aa66ea74522d9899c8aefb.zip
Merge tag 'input-for-v6.3-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input
Pull input fixes from Dmitry Torokhov: - a check in pegasus-notetaker driver to validate the type of pipe when probing a new device - a fix for Cypress touch controller to correctly parse maximum number of touches. * tag 'input-for-v6.3-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input: Input: cyttsp5 - fix sensing configuration data structure Input: pegasus-notetaker - check pipe type when probing
-rw-r--r--drivers/input/tablet/pegasus_notetaker.c6
-rw-r--r--drivers/input/touchscreen/cyttsp5.c1
2 files changed, 7 insertions, 0 deletions
diff --git a/drivers/input/tablet/pegasus_notetaker.c b/drivers/input/tablet/pegasus_notetaker.c
index d836d3dcc6a2..a68da2988f9c 100644
--- a/drivers/input/tablet/pegasus_notetaker.c
+++ b/drivers/input/tablet/pegasus_notetaker.c
@@ -296,6 +296,12 @@ static int pegasus_probe(struct usb_interface *intf,
pegasus->intf = intf;
pipe = usb_rcvintpipe(dev, endpoint->bEndpointAddress);
+ /* Sanity check that pipe's type matches endpoint's type */
+ if (usb_pipe_type_check(dev, pipe)) {
+ error = -EINVAL;
+ goto err_free_mem;
+ }
+
pegasus->data_len = usb_maxpacket(dev, pipe);
pegasus->data = usb_alloc_coherent(dev, pegasus->data_len, GFP_KERNEL,
diff --git a/drivers/input/touchscreen/cyttsp5.c b/drivers/input/touchscreen/cyttsp5.c
index 16caffa35dd9..30102cb80fac 100644
--- a/drivers/input/touchscreen/cyttsp5.c
+++ b/drivers/input/touchscreen/cyttsp5.c
@@ -111,6 +111,7 @@ struct cyttsp5_sensing_conf_data_dev {
__le16 max_z;
u8 origin_x;
u8 origin_y;
+ u8 panel_id;
u8 btn;
u8 scan_mode;
u8 max_num_of_tch_per_refresh_cycle;