aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDenis Kenzior <denkenz@gmail.com>2024-02-20 16:39:35 -0600
committerDenis Kenzior <denkenz@gmail.com>2024-02-21 10:28:22 -0600
commit2cfc037e723b1ca0e3137b1b296a75d20474bc82 (patch)
tree205d5bc957ee044f9f7e5ad2db236114d1156dc1
parent34d0183a9ff7e8b5a1b464111a8746a1bd8538eb (diff)
downloadofono-2cfc037e723b1ca0e3137b1b296a75d20474bc82.tar.gz
gobi: Fail if device could not be created
If for some reason the qmux device creation fails, indicate failure early and do not rely on the 5 second modem powered timeout.
-rw-r--r--plugins/gobi.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/plugins/gobi.c b/plugins/gobi.c
index e22b8146c..4134c62d3 100644
--- a/plugins/gobi.c
+++ b/plugins/gobi.c
@@ -431,6 +431,8 @@ static int gobi_enable(struct ofono_modem *modem)
return -EINVAL;
data->device = qmi_device_new_qmux(device);
+ if (!data->device)
+ return -EIO;
if (getenv("OFONO_QMI_DEBUG"))
qmi_device_set_debug(data->device, gobi_debug, "QMI: ");