Skip to content

Commit ffebf73

Browse files
jerome-pouillerdanieldegrasse
authored andcommitted
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>
1 parent 8d1d8d2 commit ffebf73

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

drivers/wifi/siwx91x/siwx91x_wifi_sta.c

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -76,15 +76,13 @@ sl_status_t siwx91x_wifi_module_stats_event_handler(sl_wifi_event_t event, void
7676
uint32_t result_length, void *arg)
7777
{
7878
sl_si91x_module_state_stats_response_t *notif = response;
79+
const char *reason_str = siwx91x_get_reason_string(notif->reason_code);
7980
uint8_t module_state = notif->state_code & 0xF0;
8081
struct siwx91x_dev *sidev = arg;
81-
const char *reason_str;
8282

8383
ARG_UNUSED(event);
8484
ARG_UNUSED(result_length);
8585

86-
reason_str = siwx91x_get_reason_string(notif->reason_code);
87-
8886
switch (module_state) {
8987
case STATE_BEACON_LOSS:
9088
LOG_WRN("Beacon Loss");

0 commit comments

Comments
 (0)