@@ -330,32 +330,21 @@ static void acpi_bus_osc_negotiate_platform_control(void)
330
330
if (ACPI_FAILURE (acpi_run_osc (handle , & context )))
331
331
return ;
332
332
333
- capbuf_ret = context .ret .pointer ;
334
- if (context .ret .length <= OSC_SUPPORT_DWORD ) {
335
- kfree (context .ret .pointer );
336
- return ;
337
- }
333
+ kfree (context .ret .pointer );
338
334
339
- /*
340
- * Now run _OSC again with query flag clear and with the caps
341
- * supported by both the OS and the platform.
342
- */
335
+ /* Now run _OSC again with query flag clear */
343
336
capbuf [OSC_QUERY_DWORD ] = 0 ;
344
- capbuf [OSC_SUPPORT_DWORD ] = capbuf_ret [OSC_SUPPORT_DWORD ];
345
- kfree (context .ret .pointer );
346
337
347
338
if (ACPI_FAILURE (acpi_run_osc (handle , & context )))
348
339
return ;
349
340
350
341
capbuf_ret = context .ret .pointer ;
351
- if (context .ret .length > OSC_SUPPORT_DWORD ) {
352
- osc_sb_apei_support_acked =
353
- capbuf_ret [OSC_SUPPORT_DWORD ] & OSC_SB_APEI_SUPPORT ;
354
- osc_pc_lpi_support_confirmed =
355
- capbuf_ret [OSC_SUPPORT_DWORD ] & OSC_SB_PCLPI_SUPPORT ;
356
- osc_sb_native_usb4_support_confirmed =
357
- capbuf_ret [OSC_SUPPORT_DWORD ] & OSC_SB_NATIVE_USB4_SUPPORT ;
358
- }
342
+ osc_sb_apei_support_acked =
343
+ capbuf_ret [OSC_SUPPORT_DWORD ] & OSC_SB_APEI_SUPPORT ;
344
+ osc_pc_lpi_support_confirmed =
345
+ capbuf_ret [OSC_SUPPORT_DWORD ] & OSC_SB_PCLPI_SUPPORT ;
346
+ osc_sb_native_usb4_support_confirmed =
347
+ capbuf_ret [OSC_SUPPORT_DWORD ] & OSC_SB_NATIVE_USB4_SUPPORT ;
359
348
360
349
kfree (context .ret .pointer );
361
350
}
0 commit comments