diff options
| author | Dan Carpenter <dan.carpenter@oracle.com> | 2012-06-12 12:28:50 -0400 |
|---|---|---|
| committer | Matthew Garrett <mjg@redhat.com> | 2012-06-26 14:43:45 -0400 |
| commit | 57f9616b79549e772cf4dd3aa1d2df5b6c8acdfa (patch) | |
| tree | 7e2f256a627966eca82c532aef92d6f32198608d | |
| parent | a1071a5abf1f4d4a7f8324e21b8b32b1342013c7 (diff) | |
ideapad: uninitialized data in ideapad_acpi_add()
We only initialize the high bits of "cfg". It probably doesn't cause
a problem given that this is platform specific code and doesn't have to
worry about endianness etc. But it's sort of messy.
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Matthew Garrett <mjg@redhat.com>
| -rw-r--r-- | drivers/platform/x86/ideapad-laptop.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/platform/x86/ideapad-laptop.c b/drivers/platform/x86/ideapad-laptop.c index 4f20f8dd3d7c..17f6dfd8dbfb 100644 --- a/drivers/platform/x86/ideapad-laptop.c +++ b/drivers/platform/x86/ideapad-laptop.c | |||
| @@ -694,10 +694,10 @@ MODULE_DEVICE_TABLE(acpi, ideapad_device_ids); | |||
| 694 | static int __devinit ideapad_acpi_add(struct acpi_device *adevice) | 694 | static int __devinit ideapad_acpi_add(struct acpi_device *adevice) |
| 695 | { | 695 | { |
| 696 | int ret, i; | 696 | int ret, i; |
| 697 | unsigned long cfg; | 697 | int cfg; |
| 698 | struct ideapad_private *priv; | 698 | struct ideapad_private *priv; |
| 699 | 699 | ||
| 700 | if (read_method_int(adevice->handle, "_CFG", (int *)&cfg)) | 700 | if (read_method_int(adevice->handle, "_CFG", &cfg)) |
| 701 | return -ENODEV; | 701 | return -ENODEV; |
| 702 | 702 | ||
| 703 | priv = kzalloc(sizeof(*priv), GFP_KERNEL); | 703 | priv = kzalloc(sizeof(*priv), GFP_KERNEL); |
| @@ -721,7 +721,7 @@ static int __devinit ideapad_acpi_add(struct acpi_device *adevice) | |||
| 721 | goto input_failed; | 721 | goto input_failed; |
| 722 | 722 | ||
| 723 | for (i = 0; i < IDEAPAD_RFKILL_DEV_NUM; i++) { | 723 | for (i = 0; i < IDEAPAD_RFKILL_DEV_NUM; i++) { |
| 724 | if (test_bit(ideapad_rfk_data[i].cfgbit, &cfg)) | 724 | if (test_bit(ideapad_rfk_data[i].cfgbit, &priv->cfg)) |
| 725 | ideapad_register_rfkill(adevice, i); | 725 | ideapad_register_rfkill(adevice, i); |
| 726 | else | 726 | else |
| 727 | priv->rfk[i] = NULL; | 727 | priv->rfk[i] = NULL; |
