Skip to content

Commit

Permalink
PCI ACPI: fix uninitialized variable in __pci_osc_support_set
Browse files Browse the repository at this point in the history
Fix uninitialized variable in __pci_osc_support_set().

If the ACPI namespace doesn't have any device object corresponding to
the specified hid, 'retval' in __pci_osc_support_set() is not changed
by the acpi_query_osc() callback. Since 'retval' is not initizlized in
the current implementation, the contents of 'retval' is undefined in
this case. This causes a mis-handling of ctrlset_buf[OSC_SUPPORT_TYPE]
and will cause an unexpected result in the subsequent
pci_osc_control_set() call as a result.

Signed-off-by: Kenji Kaneshige <kaneshige.kenji@jp.fujitsu.com>
Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
  • Loading branch information
Kenji Kaneshige authored and Jesse Barnes committed May 13, 2008
1 parent c714a53 commit 21e2b0a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/pci/pci-acpi.c
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,7 @@ acpi_run_osc (
acpi_status __pci_osc_support_set(u32 flags, const char *hid)
{
u32 temp;
acpi_status retval;
acpi_status retval = AE_NOT_FOUND;

if (!(flags & OSC_SUPPORT_MASKS)) {
return AE_TYPE;
Expand Down

0 comments on commit 21e2b0a

Please sign in to comment.