USB: gadget: dbgp: cleanup: remove unneeded check
len is always greater than or equal to zero here. First of all, it's type is unsigned and also we only assign it numbers which are greater than or equal to zero. Removing the check lets us pull everything in an indent level. Signed-off-by: Dan Carpenter <error27@gmail.com> Acked-by: Stephane duverger <stephane.duverger@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
This commit is contained in:
parent
912c93d160
commit
c6a76781da
|
@ -386,15 +386,13 @@ static int dbgp_setup(struct usb_gadget *gadget,
|
|||
} else
|
||||
goto fail;
|
||||
|
||||
if (len >= 0) {
|
||||
req->length = min(length, len);
|
||||
req->zero = len < req->length;
|
||||
if (data && req->length)
|
||||
memcpy(req->buf, data, req->length);
|
||||
req->length = min(length, len);
|
||||
req->zero = len < req->length;
|
||||
if (data && req->length)
|
||||
memcpy(req->buf, data, req->length);
|
||||
|
||||
req->complete = dbgp_setup_complete;
|
||||
return usb_ep_queue(gadget->ep0, req, GFP_ATOMIC);
|
||||
}
|
||||
req->complete = dbgp_setup_complete;
|
||||
return usb_ep_queue(gadget->ep0, req, GFP_ATOMIC);
|
||||
|
||||
fail:
|
||||
dev_dbg(&dbgp.gadget->dev,
|
||||
|
|
Loading…
Reference in New Issue