drivers: modem: gsm: Fix NULL being passed to rssi_handler

Fix hard fault due to NULL being passed as argument into
rssi_handler, which now derives the gsm_modem struct pointer from
the argument.

Signed-off-by: Yong Cong Sin <yongcong.sin@gmail.com>
This commit is contained in:
Yong Cong Sin 2022-01-05 23:22:45 +08:00 committed by Anas Nashif
commit e77d87da65

View file

@ -708,7 +708,7 @@ attaching:
if (!IS_ENABLED(CONFIG_GSM_MUX)) {
/* Read connection quality (RSSI) before PPP carrier is ON */
rssi_handler(NULL);
rssi_handler(&gsm->rssi_work_handle.work);
if (!(gsm->minfo.mdm_rssi && gsm->minfo.mdm_rssi != GSM_RSSI_INVALID &&
gsm->minfo.mdm_rssi < GSM_RSSI_MAXVAL)) {