Skip to contentSkip to conversation

platform/x86: surface3-wmi: fix uninitialized symbol

PATCH Applied Benjamin Tissoires 2 participants 2 messages Jan 18, 2017 x86 platform drivers

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 platform/x86: surface3-wmi: fix uninitialized symbol

The patch 3dda3b3798f9: "platform/x86: Add custom surface3 platform device for controlling LID" from Nov 25, 2016, leads to the following static checker warning:

drivers/platform/x86/surface3-wmi.c:168 s3_wmi_check_platform_device()
error: uninitialized symbol 'ts_adev'.

---

Hi Dan,

Sorry for the lag in treating this simple defect.

Cheers,
Benjamin

 drivers/platform/x86/surface3-wmi.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/platform/x86/surface3-wmi.c +1 -1
index cbf4d83..676cfca 100644
@@ -139,7 +139,7 @@ static acpi_status s3_wmi_attach_spi_device(acpi_handle handle,
 
 static int s3_wmi_check_platform_device(struct device *dev, void *data)
 {
-	struct acpi_device *adev, *ts_adev;
+	struct acpi_device *adev, *ts_adev = NULL;
 	acpi_handle handle;
 	acpi_status status;
 
Signature · 1 line
2.9.3
#1 lore raw
Quoted 7 lines · Benjamin Tissoires

The patch 3dda3b3798f9: "platform/x86: Add custom surface3 platform device for controlling LID" from Nov 25, 2016, leads to the following static checker warning:

drivers/platform/x86/surface3-wmi.c:168 s3_wmi_check_platform_device()
error: uninitialized symbol 'ts_adev'.

Pushed to fixes, thanks!

Quoted 30 lines

---

Hi Dan,

Sorry for the lag in treating this simple defect.

Cheers,
Benjamin

 drivers/platform/x86/surface3-wmi.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/platform/x86/surface3-wmi.c +1 -2
index cbf4d83..676cfca 100644
@@ -139,7 +139,7 @@ static acpi_status s3_wmi_attach_spi_device(acpi_handle handle,
 
 static int s3_wmi_check_platform_device(struct device *dev, void *data)
 {
-       struct acpi_device *adev, *ts_adev;
+       struct acpi_device *adev, *ts_adev = NULL;
        acpi_handle handle;
        acpi_status status;
 
--

2.9.3

Signature · 2 lines
With Best Regards,
Andy Shevchenko