Commit 030f6397 authored by Vinod Koul's avatar Vinod Koul Committed by Greg Kroah-Hartman

soundwire: intel: Fix uninitialized adev deref

[ Upstream commit e1c815f4 ]

In case of error, we can dereference uninitialized 'adev'

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

Fix that by not using adev for warn print and make it pr_err.
Reported-by: default avatarDan Carpenter <dan.carpenter@oracle.com>
Acked-by: default avatarPierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Signed-off-by: default avatarVinod Koul <vkoul@kernel.org>
Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
parent 4b4153b7
...@@ -151,7 +151,7 @@ static acpi_status sdw_intel_acpi_cb(acpi_handle handle, u32 level, ...@@ -151,7 +151,7 @@ static acpi_status sdw_intel_acpi_cb(acpi_handle handle, u32 level,
struct acpi_device *adev; struct acpi_device *adev;
if (acpi_bus_get_device(handle, &adev)) { if (acpi_bus_get_device(handle, &adev)) {
dev_err(&adev->dev, "Couldn't find ACPI handle\n"); pr_err("%s: Couldn't find ACPI handle\n", __func__);
return AE_NOT_FOUND; return AE_NOT_FOUND;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment