Re: [PATCH 5.4 65/90] Input: aiptek - use descriptors of current altsetting
From: Johan Hovold
Date: Tue Feb 04 2020 - 03:12:06 EST
On Mon, Feb 03, 2020 at 04:20:08PM +0000, Greg Kroah-Hartman wrote:
> From: Johan Hovold <johan@xxxxxxxxxx>
>
> [ Upstream commit cfa4f6a99fb183742cace65ec551b444852b8ef6 ]
>
> Make sure to always use the descriptors of the current alternate setting
> to avoid future issues when accessing fields that may differ between
> settings.
>
> Signed-off-by: Johan Hovold <johan@xxxxxxxxxx>
> Acked-by: Vladis Dronov <vdronov@xxxxxxxxxx>
> Link: https://lore.kernel.org/r/20191210113737.4016-4-johan@xxxxxxxxxx
> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@xxxxxxxxx>
> Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>
> ---
> drivers/input/tablet/aiptek.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/input/tablet/aiptek.c b/drivers/input/tablet/aiptek.c
> index 06d0ffef4a171..e08b0ef078e81 100644
> --- a/drivers/input/tablet/aiptek.c
> +++ b/drivers/input/tablet/aiptek.c
> @@ -1713,7 +1713,7 @@ aiptek_probe(struct usb_interface *intf, const struct usb_device_id *id)
>
> aiptek->inputdev = inputdev;
> aiptek->intf = intf;
> - aiptek->ifnum = intf->altsetting[0].desc.bInterfaceNumber;
> + aiptek->ifnum = intf->cur_altsetting->desc.bInterfaceNumber;
> aiptek->inDelay = 0;
> aiptek->endDelay = 0;
> aiptek->previousJitterable = 0;
I asked Sasha to drop this one directly when he added it, so it's
probable gone from all the stable queues by now.
But I'm still curious how this ended up being selected for stable in the
first place? There's no fixes or stable tag in the commit, and I never
received a mail from the AUTOSEL scripts.
Johan