[alsa-devel] [bug report] soundwire: intel: Add Intel init module

Dan Carpenter dan.carpenter at oracle.com
Mon Aug 6 10:55:12 CEST 2018


Hello Vinod Koul,

The patch d62a7d41f38e: "soundwire: intel: Add Intel init module"
from Dec 14, 2017, leads to the following static checker warning:

	drivers/soundwire/intel_init.c:154 sdw_intel_acpi_cb()
	error: uninitialized symbol 'adev'.

drivers/soundwire/intel_init.c
   147  static acpi_status sdw_intel_acpi_cb(acpi_handle handle, u32 level,
   148                                          void *cdata, void **return_value)
   149  {
   150          struct sdw_intel_res *res = cdata;
   151          struct acpi_device *adev;
   152  
   153          if (acpi_bus_get_device(handle, &adev)) {
   154                  dev_err(&adev->dev, "Couldn't find ACPI handle\n");
   155                  return AE_NOT_FOUND;

We can't dereference "adev" if the acpi_bus_get_device() fails.

   156          }
   157  
   158          res->handle = handle;
   159          return AE_OK;
   160  }

Related:
drivers/acpi/scan.c:2008 acpi_walk_dep_device_list() error: uninitialized symbol 'adev'.
drivers/usb/core/usb-acpi.c:204 usb_acpi_find_companion() error: uninitialized symbol 'adev'.

regards,
dan carpenter


More information about the Alsa-devel mailing list