aboutsummaryrefslogtreecommitdiff
path: root/drivers/eisa
diff options
context:
space:
mode:
authorRafael J. Wysocki <rafael.j.wysocki@intel.com>2013-06-19 00:44:45 +0200
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2013-06-27 10:38:45 -0700
commitfb8b3337e5cb2adf7d75f0842522e4ff5847cd90 (patch)
tree81e9143153976bcfe44f6126d468141147949b66 /drivers/eisa
parent7b7cda9f9cd4d928c69b3aa7a9a70c9fff74b256 (diff)
ACPI / PM: Fix error code path for power resources initialization
commit 6ee22e9d59151550a55d370b14109bdae8b58bda upstream. Commit 781d737 (ACPI: Drop power resources driver) introduced a bug in the power resources initialization error code path causing a NULL pointer to be referenced in acpi_release_power_resource() if there's an error triggering a jump to the 'err' label in acpi_add_power_resource(). This happens because the list_node field of struct acpi_power_resource has not been initialized yet at this point and doing a list_del() on it is a bad idea. To prevent this problem from occuring, initialize the list_node field of struct acpi_power_resource upfront. Reported-by: Mika Westerberg <mika.westerberg@linux.intel.com> Tested-by: Lan Tianyu <tianyu.lan@intel.com> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com> Acked-by: Yasuaki Ishimatsu <isimatu.yasuaki@jp.fujitsu.com> Reviewed-by: Mika Westerberg <mika.westerberg@linux.intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/eisa')
0 files changed, 0 insertions, 0 deletions