uqmi: commands-uim: fix uninitialized use of card_application_state
authorAlexander Couzens <lynxis@fe80.eu>
Sat, 9 Mar 2024 19:17:07 +0000 (20:17 +0100)
committerAlexander Couzens <lynxis@fe80.eu>
Sat, 9 Mar 2024 20:15:21 +0000 (21:15 +0100)
Signed-off-by: Alexander Couzens <lynxis@fe80.eu>
commands-uim.c

index b29c46438bc599ad69c1265c1ace1c02a8f01517..924a95965ef44f9640dcb8d43e52f99187b58d8c 100644 (file)
@@ -78,7 +78,7 @@ static void cmd_uim_get_sim_state_cb(struct qmi_dev *qmi, struct qmi_request *re
                if (res.data.card_status.cards[i].card_state != QMI_UIM_CARD_STATE_PRESENT)
                        continue;
 
-               uint8_t card_application_state;
+               uint8_t card_application_state = QMI_UIM_CARD_APPLICATION_STATE_UNKNOWN;
                uint8_t pin1_state = res.data.card_status.cards[i].upin_state;
                uint8_t pin1_retries = res.data.card_status.cards[i].upin_retries;
                uint8_t puk1_retries = res.data.card_status.cards[i].upuk_retries;