Re: [PATCH 1/4] USB: add missing "{}" in map_urb_for_dma

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

 



On Wed, 12 May 2010 tom.leiming@xxxxxxxxx wrote:

> From: Ming Lei <tom.leiming@xxxxxxxxx>
> 
> Obviously, {} is needed in the branch of
> 	"else if (hcd->driver->flags & HCD_LOCAL_MEM)"
> for handling of setup packet mapping.
> 
> Signed-off-by: Ming Lei <tom.leiming@xxxxxxxxx>
> ---
>  drivers/usb/core/hcd.c |    3 ++-
>  1 files changed, 2 insertions(+), 1 deletions(-)
> 
> diff --git a/drivers/usb/core/hcd.c b/drivers/usb/core/hcd.c
> index 297c92e..12742f1 100644
> --- a/drivers/usb/core/hcd.c
> +++ b/drivers/usb/core/hcd.c
> @@ -1327,7 +1327,7 @@ static int map_urb_for_dma(struct usb_hcd *hcd, struct urb *urb,
>  						urb->setup_dma))
>  				return -EAGAIN;
>  			urb->transfer_flags |= URB_SETUP_MAP_SINGLE;
> -		} else if (hcd->driver->flags & HCD_LOCAL_MEM)
> +		} else if (hcd->driver->flags & HCD_LOCAL_MEM) {
>  			ret = hcd_alloc_coherent(
>  					urb->dev->bus, mem_flags,
>  					&urb->setup_dma,
> @@ -1337,6 +1337,7 @@ static int map_urb_for_dma(struct usb_hcd *hcd, struct urb *urb,
>  			if (ret)
>  				return ret;
>  			urb->transfer_flags |= URB_SETUP_MAP_LOCAL;
> +		}
>  	}
>  
>  	dir = usb_urb_dir_in(urb) ? DMA_FROM_DEVICE : DMA_TO_DEVICE;

Yes, yes!  This is clearly an oversight.

Acked-by: Alan Stern <stern@xxxxxxxxxxxxxxxxxxx>

--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

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

  Powered by Linux