Re: [PATCH 1/2] usb: gadget: f_mass_storage: Remove useless rc variable

Heinrich Schuchardt <[email protected]>
Newsgroups gmane.comp.boot-loaders.u-boot
Message-ID <214c4ebc-5d7b-453d-9f39-b1befe48305d__23739.7349251964$1786981474$gmane$org@gmx.de>
On 8/17/26 17:41, Patrice Chotard wrote:
> rc variable is used as sleep_thread() return value.
> It's initialized to 0 and never updated inside sleep_thread(),
> remove it and return 0.
> 
> Signed-off-by: Patrice Chotard <[email protected]>

Reviewed-by: Heinrich Schuchardt <[email protected]>

> ---
>   drivers/usb/gadget/f_mass_storage.c | 4 ++--
>   1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/usb/gadget/f_mass_storage.c b/drivers/usb/gadget/f_mass_storage.c
> index 7eb667c130d..621852080e2 100644
> --- a/drivers/usb/gadget/f_mass_storage.c
> +++ b/drivers/usb/gadget/f_mass_storage.c
> @@ -650,7 +650,6 @@ static void busy_indicator(void)
>   
>   static int sleep_thread(struct fsg_common *common)
>   {
> -	int	rc = 0;
>   	int i = 0, k = 0;
>   
>   	/* Wait until a signal arrives or we are woken up */
> @@ -684,7 +683,8 @@ static int sleep_thread(struct fsg_common *common)
>   		dm_usb_gadget_handle_interrupts(udcdev);
>   	}
>   	common->thread_wakeup_needed = 0;
> -	return rc;
> +
> +	return 0;
>   }
>   
>   /*-------------------------------------------------------------------------*/
>
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.