drivers: wifi: siwx91x: Assign variable on declaration

When a variable is assigned once, we try to assign it during the
declaration.

Signed-off-by: Jérôme Pouiller <jerome.pouiller@silabs.com>
This commit is contained in:
Jérôme Pouiller 2025-06-25 10:19:56 +02:00 committed by Daniel DeGrasse
parent 8d1d8d2b86
commit ffebf73079

View File

@ -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");