aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/intel/iwlwifi/fw/regulatory.c
diff options
context:
space:
mode:
authorJohannes Berg <[email protected]>2024-02-04 09:53:18 +0000
committerJohannes Berg <[email protected]>2024-02-04 09:53:18 +0000
commit4c60c8054dd8a36091aab585569c8d12a0085bd9 (patch)
treedcc83d25ddc887a6062de6397e751b50da311334 /drivers/net/wireless/intel/iwlwifi/fw/regulatory.c
parentwifi: iwlwifi: fw: fix compile w/o CONFIG_ACPI (diff)
downloadkernel-4c60c8054dd8a36091aab585569c8d12a0085bd9.tar.gz
kernel-4c60c8054dd8a36091aab585569c8d12a0085bd9.zip
wifi: iwlwifi: fw: fix compiler warning for NULL string print
When the system is compiled without CONFIG_DMI, the function here statically returns NULL, leading to a compiler warning. Catch that and print "<unknown>" in that case. While at it, fix some indentation in the function. Reported-by: kernel test robot <[email protected]> Closes: https://lore.kernel.org/oe-kbuild-all/[email protected]/ Fixes: 09059c6764a8 ("wifi: iwlwifi: prepare for reading PPAG table from UEFI") Signed-off-by: Johannes Berg <[email protected]>
Diffstat (limited to 'drivers/net/wireless/intel/iwlwifi/fw/regulatory.c')
-rw-r--r--drivers/net/wireless/intel/iwlwifi/fw/regulatory.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/net/wireless/intel/iwlwifi/fw/regulatory.c b/drivers/net/wireless/intel/iwlwifi/fw/regulatory.c
index a42775141952..21b90278d1f2 100644
--- a/drivers/net/wireless/intel/iwlwifi/fw/regulatory.c
+++ b/drivers/net/wireless/intel/iwlwifi/fw/regulatory.c
@@ -397,9 +397,9 @@ bool iwl_is_ppag_approved(struct iwl_fw_runtime *fwrt)
if (!dmi_check_system(dmi_ppag_approved_list)) {
IWL_DEBUG_RADIO(fwrt,
"System vendor '%s' is not in the approved list, disabling PPAG.\n",
- dmi_get_system_info(DMI_SYS_VENDOR));
- fwrt->ppag_flags = 0;
- return false;
+ dmi_get_system_info(DMI_SYS_VENDOR) ?: "<unknown>");
+ fwrt->ppag_flags = 0;
+ return false;
}
return true;