From ffebf73079b2148d523e4e36148d2952ec83c18b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=B4me=20Pouiller?= Date: Wed, 25 Jun 2025 10:19:56 +0200 Subject: [PATCH] drivers: wifi: siwx91x: Assign variable on declaration MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit When a variable is assigned once, we try to assign it during the declaration. Signed-off-by: Jérôme Pouiller --- drivers/wifi/siwx91x/siwx91x_wifi_sta.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/wifi/siwx91x/siwx91x_wifi_sta.c b/drivers/wifi/siwx91x/siwx91x_wifi_sta.c index edbb91c283b..6037d7c0ce6 100644 --- a/drivers/wifi/siwx91x/siwx91x_wifi_sta.c +++ b/drivers/wifi/siwx91x/siwx91x_wifi_sta.c @@ -76,15 +76,13 @@ sl_status_t siwx91x_wifi_module_stats_event_handler(sl_wifi_event_t event, void uint32_t result_length, void *arg) { sl_si91x_module_state_stats_response_t *notif = response; + const char *reason_str = siwx91x_get_reason_string(notif->reason_code); uint8_t module_state = notif->state_code & 0xF0; struct siwx91x_dev *sidev = arg; - const char *reason_str; ARG_UNUSED(event); ARG_UNUSED(result_length); - reason_str = siwx91x_get_reason_string(notif->reason_code); - switch (module_state) { case STATE_BEACON_LOSS: LOG_WRN("Beacon Loss");