Re: [PATCH 2/2] USB: ehci: tegra: Align DMA transfers to 32 bytes

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

 



Am Sonntag, 19. Dezember 2010, 22:38:18 schrieb Robert Morell:
> +static int tegra_ehci_map_urb_for_dma(struct usb_hcd *hcd, struct urb *urb,
> +                                     gfp_t mem_flags)
> +{
> +       int ret;
> +
> +       ret = alloc_temp_buffer(urb, mem_flags);
> +       if (ret)
> +               return ret;
> +
> +       ret = usb_hcd_map_urb_for_dma(hcd, urb, mem_flags);
> +       if (ret)
> +               free_temp_buffer(urb);

Using free_temp_buffer() in the error case looks like a bad
idea, as you'd execute the memcpy if the direction tells you to.

	Regards
		Oliver
--
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