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.

Merge tag 'pm+acpi-4.5-final' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm

Pull power management and ACPI fixes from Rafael Wysocki:
"Two more fixes for issues introduced recently, one in the generic
device properties framework and one in ACPICA.

Specifics:

- Revert a recent ACPICA commit that has been reverted upstream,
because it caused problems to happen on user systems and the
problem it attempted to address will not be relevant any more after
upcoming ACPI specification changes (Bob Moore).

- Fix crash in the generic device properties framework introduced by
a recent change that forgot to check pointers against error values
in addition to checking them against NULL (Heikki Krogerus)"

* tag 'pm+acpi-4.5-final' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm:
device property: fwnode->secondary may contain ERR_PTR(-ENODEV)
ACPICA: Revert "Parser: Fix for SuperName method invocation"

+8 -9
+4 -5
drivers/acpi/acpica/psargs.c
··· 269 269 */ 270 270 if (ACPI_SUCCESS(status) && 271 271 possible_method_call && (node->type == ACPI_TYPE_METHOD)) { 272 - if (GET_CURRENT_ARG_TYPE(walk_state->arg_types) == 273 - ARGP_SUPERNAME) { 272 + if (walk_state->opcode == AML_UNLOAD_OP) { 274 273 /* 275 274 * acpi_ps_get_next_namestring has increased the AML pointer, 276 275 * so we need to restore the saved AML pointer for method call. ··· 696 697 * 697 698 * PARAMETERS: walk_state - Current state 698 699 * parser_state - Current parser state object 699 - * arg_type - The parser argument type (ARGP_*) 700 + * arg_type - The argument type (AML_*_ARG) 700 701 * return_arg - Where the next arg is returned 701 702 * 702 703 * RETURN: Status, and an op object containing the next argument. ··· 816 817 return_ACPI_STATUS(AE_NO_MEMORY); 817 818 } 818 819 819 - /* super_name allows argument to be a method call */ 820 + /* To support super_name arg of Unload */ 820 821 821 - if (arg_type == ARGP_SUPERNAME) { 822 + if (walk_state->opcode == AML_UNLOAD_OP) { 822 823 status = 823 824 acpi_ps_get_next_namepath(walk_state, 824 825 parser_state, arg,
+4 -4
drivers/base/property.c
··· 218 218 bool ret; 219 219 220 220 ret = __fwnode_property_present(fwnode, propname); 221 - if (ret == false && fwnode && fwnode->secondary) 221 + if (ret == false && fwnode && !IS_ERR_OR_NULL(fwnode->secondary)) 222 222 ret = __fwnode_property_present(fwnode->secondary, propname); 223 223 return ret; 224 224 } ··· 423 423 int _ret_; \ 424 424 _ret_ = FWNODE_PROP_READ(_fwnode_, _propname_, _type_, _proptype_, \ 425 425 _val_, _nval_); \ 426 - if (_ret_ == -EINVAL && _fwnode_ && _fwnode_->secondary) \ 426 + if (_ret_ == -EINVAL && _fwnode_ && !IS_ERR_OR_NULL(_fwnode_->secondary)) \ 427 427 _ret_ = FWNODE_PROP_READ(_fwnode_->secondary, _propname_, _type_, \ 428 428 _proptype_, _val_, _nval_); \ 429 429 _ret_; \ ··· 593 593 int ret; 594 594 595 595 ret = __fwnode_property_read_string_array(fwnode, propname, val, nval); 596 - if (ret == -EINVAL && fwnode && fwnode->secondary) 596 + if (ret == -EINVAL && fwnode && !IS_ERR_OR_NULL(fwnode->secondary)) 597 597 ret = __fwnode_property_read_string_array(fwnode->secondary, 598 598 propname, val, nval); 599 599 return ret; ··· 621 621 int ret; 622 622 623 623 ret = __fwnode_property_read_string(fwnode, propname, val); 624 - if (ret == -EINVAL && fwnode && fwnode->secondary) 624 + if (ret == -EINVAL && fwnode && !IS_ERR_OR_NULL(fwnode->secondary)) 625 625 ret = __fwnode_property_read_string(fwnode->secondary, 626 626 propname, val); 627 627 return ret;