Skip to content

Commit 6083556

Browse files
marwaiehm-stkartben
authored andcommitted
drivers: usb: device: resolve USB build error for STM32N6
- Removing the unused declaration of 'ret' in the usb_dc_stm32_init function for STM32N6. - Ensuring the 'ret' variable is used correctly in the pinctrl_apply_state function call. Signed-off-by: IBEN EL HADJ MESSAOUD Marwa <marwa.ibenelhadjmessaoud-ext@st.com>
1 parent ae9f052 commit 6083556

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

drivers/usb/device/usb_dc_stm32.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -459,7 +459,6 @@ static int usb_dc_stm32_clock_disable(void)
459459
static int usb_dc_stm32_init(void)
460460
{
461461
HAL_StatusTypeDef status;
462-
int ret;
463462
unsigned int i;
464463

465464
usb_dc_stm32_state.pcd.Init.speed =
@@ -521,7 +520,7 @@ static int usb_dc_stm32_init(void)
521520

522521
#if !DT_HAS_COMPAT_STATUS_OKAY(st_stm32n6_otghs)
523522
LOG_DBG("Pinctrl signals configuration");
524-
ret = pinctrl_apply_state(usb_pcfg, PINCTRL_STATE_DEFAULT);
523+
int ret = pinctrl_apply_state(usb_pcfg, PINCTRL_STATE_DEFAULT);
525524
if (ret < 0) {
526525
LOG_ERR("USB pinctrl setup failed (%d)", ret);
527526
return ret;

0 commit comments

Comments
 (0)