diff options
Diffstat (limited to 'drivers/acpi/utilities/utstate.c')
-rw-r--r-- | drivers/acpi/utilities/utstate.c | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/drivers/acpi/utilities/utstate.c b/drivers/acpi/utilities/utstate.c index 637c5f964879..aec5034cd978 100644 --- a/drivers/acpi/utilities/utstate.c +++ b/drivers/acpi/utilities/utstate.c | |||
@@ -321,8 +321,8 @@ union acpi_generic_state *acpi_ut_create_control_state(void) | |||
321 | * | 321 | * |
322 | * RETURN: None | 322 | * RETURN: None |
323 | * | 323 | * |
324 | * DESCRIPTION: Put a state object back into the global state cache. The object | 324 | * DESCRIPTION: Release a state object to the state cache. NULL state objects |
325 | * is not actually freed at this time. | 325 | * are ignored. |
326 | * | 326 | * |
327 | ******************************************************************************/ | 327 | ******************************************************************************/ |
328 | 328 | ||
@@ -330,6 +330,10 @@ void acpi_ut_delete_generic_state(union acpi_generic_state *state) | |||
330 | { | 330 | { |
331 | ACPI_FUNCTION_TRACE("ut_delete_generic_state"); | 331 | ACPI_FUNCTION_TRACE("ut_delete_generic_state"); |
332 | 332 | ||
333 | (void)acpi_os_release_object(acpi_gbl_state_cache, state); | 333 | /* Ignore null state */ |
334 | |||
335 | if (state) { | ||
336 | (void)acpi_os_release_object(acpi_gbl_state_cache, state); | ||
337 | } | ||
334 | return_VOID; | 338 | return_VOID; |
335 | } | 339 | } |