]> git.proxmox.com Git - mirror_ubuntu-eoan-kernel.git/commitdiff
USB: add missing "{}" in map_urb_for_dma
authorMing Lei <tom.leiming@gmail.com>
Wed, 12 May 2010 15:38:12 +0000 (23:38 +0800)
committerGreg Kroah-Hartman <gregkh@suse.de>
Thu, 20 May 2010 20:21:45 +0000 (13:21 -0700)
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@gmail.com>
Acked-by: Alan Stern <stern@rowland.harvard.edu>
Cc: stable <stable@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/usb/core/hcd.c

index 297c92e4bf8d48a5123ce49077174df0230ed62c..12742f152f431fedb567665c2ec3ce5845a98882 100644 (file)
@@ -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;