* Re: [PATCH] udc:Remove no longer required varaiable in the function udc_set_halt
[not found] <1435430744-15968-1-git-send-email-xerofoify@gmail.com>
@ 2015-07-24 9:05 ` Thomas Dahlmann
0 siblings, 0 replies; only message in thread
From: Thomas Dahlmann @ 2015-07-24 9:05 UTC (permalink / raw)
To: Nicholas Krause; +Cc: balbi, linux-geode, linux-usb, linux-kernel
ACK and thanks! for your patches.
Am 6/27/2015 8:45 PM, schrieb Nicholas Krause:
> This removes the no longer required variable retval in the function
> udc_set_halt now due to this variable never being set to a return
> value after calling another function inside the function udc_set_halt
> and only being used unchanged at the end of this function's body.
> Due to this remove the no longer required variable retval and return
> the value zero directly if we arrive at the end of this particular
> function's body without any internal errors occurring.
>
> Signed-off-by: Nicholas Krause <xerofoify@gmail.com>
> ---
> drivers/usb/gadget/udc/amd5536udc.c | 3 +--
> 1 file changed, 1 insertion(+), 2 deletions(-)
>
> diff --git a/drivers/usb/gadget/udc/amd5536udc.c b/drivers/usb/gadget/udc/amd5536udc.c
> index de7e5e2..5b99e53 100644
> --- a/drivers/usb/gadget/udc/amd5536udc.c
> +++ b/drivers/usb/gadget/udc/amd5536udc.c
> @@ -1307,7 +1307,6 @@ udc_set_halt(struct usb_ep *usbep, int halt)
> struct udc_ep *ep;
> u32 tmp;
> unsigned long iflags;
> - int retval = 0;
>
> if (!usbep)
> return -EINVAL;
> @@ -1360,7 +1359,7 @@ udc_set_halt(struct usb_ep *usbep, int halt)
> }
> }
> spin_unlock_irqrestore(&udc_stall_spinlock, iflags);
> - return retval;
> + return 0;
> }
>
> /* gadget interface */
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2015-07-24 9:01 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <1435430744-15968-1-git-send-email-xerofoify@gmail.com>
2015-07-24 9:05 ` [PATCH] udc:Remove no longer required varaiable in the function udc_set_halt Thomas Dahlmann
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox