platform/x86: surface3-wmi: fix uninitialized symbol
authorBenjamin Tissoires <benjamin.tissoires@redhat.com>
Wed, 18 Jan 2017 08:13:46 +0000 (09:13 +0100)
committerAndy Shevchenko <andriy.shevchenko@linux.intel.com>
Fri, 20 Jan 2017 23:43:42 +0000 (01:43 +0200)
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'.

Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Benjamin Tissoires <benjamin.tissoires@redhat.com>
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
drivers/platform/x86/surface3-wmi.c

index 6ac1d1349d7e29b2104db726be60565b5079f0a0..25b176996cb793a789214a1a1237910b01cd3673 100644 (file)
@@ -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;