[PATCH 1/2] usb: gadget: f_mass_storage: Remove useless rc variable
Patrice Chotard <[email protected]>
| Newsgroups | org.u-boot-project.lists.u-boot |
|---|---|
| Message-ID | <20260817-move_schedule_inside_sleep_thread-v1-1-0023194e8c47@foss.st.com> |
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]> --- 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; } /*-------------------------------------------------------------------------*/ -- 2.43.0