Re: [PATCH] USB: usbfs: remove double evaluation of usb_sndctrlpipe()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, May 21, 2021 at 10:28:56PM +0930, Geoffrey D. Bennett wrote:
> usb_sndctrlpipe() is evaluated in do_proc_control(), saved in a
> variable, then evaluated again. Use the saved variable instead, to
> match the use of usb_rcvctrlpipe().
> 
> Fixes: 4c6e8971cbe0 ("USB: make the "usbfs_snoop" log more pertinent")
> Signed-off-by: Geoffrey D. Bennett <g@xxxxx>
> ---
>  drivers/usb/core/devio.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/usb/core/devio.c b/drivers/usb/core/devio.c
> index 533236366a03..4a8ec136460c 100644
> --- a/drivers/usb/core/devio.c
> +++ b/drivers/usb/core/devio.c
> @@ -1162,7 +1162,7 @@ static int do_proc_control(struct usb_dev_state *ps,
>  			tbuf, ctrl->wLength);
>  
>  		usb_unlock_device(dev);
> -		i = usb_control_msg(dev, usb_sndctrlpipe(dev, 0), ctrl->bRequest,
> +		i = usb_control_msg(dev, pipe, ctrl->bRequest,
>  				    ctrl->bRequestType, ctrl->wValue, ctrl->wIndex,
>  				    tbuf, ctrl->wLength, tmo);
>  		usb_lock_device(dev);

When you resubmit without the Fixes: tag, you can add:

Acked-by: Alan Stern <stern@xxxxxxxxxxxxxxxxxxx>

Alan Stern



[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux