telit: fix segmentation fault in initialize_alternate_3g_band
Fix the following segmentation fault: ModemManager[128007]: mm_port_peek_kernel_device: assertion 'MM_IS_PORT (self)' failed Thread 1 "ModemManager" received signal SIGSEGV, Segmentation fault. 0x00005555556c6e3e in mm_kernel_device_get_global_property (self=0x0, property=0x7ffff5947480 "ID_MM_TELIT_BND_ALTERNATE") at kerneldevice/mm-kernel-device.c:309 Reported by Carlo Lobrano <c.lobrano@gmail.com>
This commit is contained in:

committed by
Aleksander Morgado

parent
176b3f53c2
commit
41482d823b
@@ -58,6 +58,7 @@ initialize_alternate_3g_band (MMSharedTelit *self,
|
|||||||
MMKernelDevice *port;
|
MMKernelDevice *port;
|
||||||
|
|
||||||
primary = MM_PORT (mm_base_modem_peek_port_primary (MM_BASE_MODEM (self)));
|
primary = MM_PORT (mm_base_modem_peek_port_primary (MM_BASE_MODEM (self)));
|
||||||
|
if (primary) {
|
||||||
port = mm_port_peek_kernel_device (primary);
|
port = mm_port_peek_kernel_device (primary);
|
||||||
|
|
||||||
/* Lookup for the tag specifying that we're using the alternate 3G band mapping */
|
/* Lookup for the tag specifying that we're using the alternate 3G band mapping */
|
||||||
@@ -65,6 +66,7 @@ initialize_alternate_3g_band (MMSharedTelit *self,
|
|||||||
if (priv->alternate_3g_bands)
|
if (priv->alternate_3g_bands)
|
||||||
mm_obj_dbg (self, "telit modem using alternate 3G band mask setup");
|
mm_obj_dbg (self, "telit modem using alternate 3G band mask setup");
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
static Private *
|
static Private *
|
||||||
get_private (MMSharedTelit *self)
|
get_private (MMSharedTelit *self)
|
||||||
|
Reference in New Issue
Block a user