[alsa-devel] [bug report] soundwire: intel: Add Intel init module
Pierre-Louis Bossart
pierre-louis.bossart at linux.intel.com
Mon Aug 6 15:57:54 CEST 2018
On 8/6/18 3:55 AM, Dan Carpenter wrote:
> 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.
Might as well remove the error log, it's not very useful?
>
> 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
> _______________________________________________
> Alsa-devel mailing list
> Alsa-devel at alsa-project.org
> http://mailman.alsa-project.org/mailman/listinfo/alsa-devel
>
More information about the Alsa-devel
mailing list