Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

platform/x86: dell-pc: Propagate errors when detecting feature support

The dell-pc module only supports the thermal management Dell SMBIOS
feature, therefore it is pointless to have it loaded if this is not
available.

Signed-off-by: Kurt Borja <kuurtb@gmail.com>
Link: https://lore.kernel.org/r/20250411-dell-faux-v1-1-ea1f1c929b7e@gmail.com
Reviewed-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>

authored by

Kurt Borja and committed by
Ilpo Järvinen
4630b99d 98152782

+1 -11
+1 -11
drivers/platform/x86/dell/dell-pc.c
··· 146 146 147 147 dell_fill_request(&buffer, 0x0, 0, 0, 0); 148 148 ret = dell_send_request(&buffer, CLASS_INFO, SELECT_THERMAL_MANAGEMENT); 149 - /* Thermal function not supported */ 150 - if (ret == -ENXIO) { 151 - *supported_bits = 0; 152 - return 0; 153 - } 154 149 if (ret) 155 150 return ret; 156 151 *supported_bits = FIELD_GET(DELL_THERMAL_SUPPORTED, buffer.output[1]); ··· 250 255 struct device *ppdev; 251 256 int ret; 252 257 253 - /* If thermal commands are not supported, exit without error */ 254 258 if (!dell_smbios_class_is_supported(CLASS_INFO)) 255 - return 0; 259 + return -ENODEV; 256 260 257 - /* If thermal modes are not supported, exit without error */ 258 261 ret = thermal_get_supported_modes(&supported_modes); 259 262 if (ret < 0) 260 263 return ret; 261 - if (!supported_modes) 262 - return 0; 263 264 264 265 platform_device = platform_device_register_simple("dell-pc", PLATFORM_DEVID_NONE, NULL, 0); 265 266 if (IS_ERR(platform_device)) ··· 288 297 if (!dmi_check_system(dell_device_table)) 289 298 return -ENODEV; 290 299 291 - /* Do not fail module if thermal modes not supported, just skip */ 292 300 ret = thermal_init(); 293 301 if (ret) 294 302 goto fail_thermal;