platform/x86: surface3-wmi: fix uninitialized symbol

The patch 3dda3b3798: "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>
This commit is contained in:
Benjamin Tissoires 2017-01-18 09:13:46 +01:00 committed by Andy Shevchenko
parent 44e6861646
commit e95ac4574b

View 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;