* Sergei Shtylyov | 2011-12-09 15:49:44 [+0400]: >Hello. Hi Sergei, >>diff --git a/drivers/usb/gadget/dummy_hcd.c b/drivers/usb/gadget/dummy_hcd.c >>index bfba4aa..5ba8e18 100644 >>--- a/drivers/usb/gadget/dummy_hcd.c >>+++ b/drivers/usb/gadget/dummy_hcd.c >[...] >>@@ -1084,9 +1085,10 @@ static int dummy_urb_enqueue ( >> unsigned long flags; >> int rc; >> >>- if (!urb->transfer_buffer&& urb->transfer_buffer_length) >>- return -EINVAL; >>- >>+ if (!urb->transfer_buffer&& urb->transfer_buffer_length) { >>+ if (!urb->num_sgs) >>+ return -EINVAL; >>+ } > > Why not collapse all this into single *if*? Also, the last *if* >seems overindented, and {} around it are not necessary. I removed that check. >> urbp = kmalloc (sizeof *urbp, mem_flags); >> if (!urbp) >> return -ENOMEM; >>@@ -1140,21 +1142,82 @@ static int dummy_urb_dequeue(struct usb_hcd *hcd, struct urb *urb, int status) >[...] >>+ sg_miter_start(&miter, urb->sg, urb->num_sgs, >>+ flags); > > No need to break the line above. Fixed. >WBR, Sergei Sebastian -- 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