blob: b440405ffc887cb14b5b42e4863bdca96627fee3 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
|
From 046b79a6766b6384db9cd56a9af5d148787bafe4 Mon Sep 17 00:00:00 2001
From: Dan Williams <dan@ioncontrol.co>
Date: Sat, 12 Apr 2025 23:56:13 -0500
Subject: [PATCH] shared-fibocom: don't assume parent implements the firmware
interface
MMBroadbandModemMbimMtkFibocom doesn't, so don't assert it.
Fixes: https://gitlab.freedesktop.org/mobile-broadband/ModemManager/-/issues/975
Signed-off-by: Dan Williams <dan@ioncontrol.co>
---
src/plugins/fibocom/mm-shared-fibocom.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
--- a/src/plugins/fibocom/mm-shared-fibocom.c
+++ b/src/plugins/fibocom/mm-shared-fibocom.c
@@ -75,8 +75,8 @@ get_private (MMSharedFibocom *self)
priv->class_parent = MM_SHARED_FIBOCOM_GET_IFACE (self)->peek_parent_class (self);
/* Setup firmware interface of parent class */
- g_assert (MM_SHARED_FIBOCOM_GET_IFACE (self)->peek_parent_firmware_interface);
- priv->iface_modem_firmware_parent = MM_SHARED_FIBOCOM_GET_IFACE (self)->peek_parent_firmware_interface (self);
+ if (MM_SHARED_FIBOCOM_GET_IFACE (self)->peek_parent_firmware_interface)
+ priv->iface_modem_firmware_parent = MM_SHARED_FIBOCOM_GET_IFACE (self)->peek_parent_firmware_interface (self);
g_object_set_qdata_full (G_OBJECT (self), private_quark, priv, (GDestroyNotify)private_free);
}
|