diff --git a/wmi/src/wmi_unified_tlv.c b/wmi/src/wmi_unified_tlv.c index bd0025a42578..4f134210b276 100644 --- a/wmi/src/wmi_unified_tlv.c +++ b/wmi/src/wmi_unified_tlv.c @@ -8676,19 +8676,19 @@ static bool is_service_enabled_tlv(wmi_unified_t wmi_handle, return false; } - if (!soc->wmi_ext_service_bitmap) { - wmi_err("WMI service ext bit map is not saved yet"); - return false; - } - /* if wmi_service_enabled was received with extended2 bitmap, * use WMI_SERVICE_EXT2_IS_ENABLED to check the services. */ - if (soc->wmi_ext2_service_bitmap) + if (soc->wmi_ext2_service_bitmap) { + if (!soc->wmi_ext_service_bitmap) { + wmi_err("WMI service ext bit map is not saved yet"); + return false; + } return WMI_SERVICE_EXT2_IS_ENABLED(soc->wmi_service_bitmap, soc->wmi_ext_service_bitmap, soc->wmi_ext2_service_bitmap, service_id); + } if (service_id >= WMI_MAX_EXT_SERVICE) { wmi_err("Service id %d but WMI ext2 service bitmap is NULL",