summaryrefslogtreecommitdiff
path: root/drivers/soundwire
diff options
context:
space:
mode:
authorVinod Koul <vkoul@kernel.org>2018-08-07 09:24:50 +0300
committerVinod Koul <vkoul@kernel.org>2018-08-27 07:19:48 +0300
commite1c815f4b24a305e5bc9eceb541674bf4d02b709 (patch)
treecc809a843249155a91f7af37b19b182feebcc4aa /drivers/soundwire
parent30246e2d78c0b06d67f77c4239f6741e77f42185 (diff)
downloadlinux-e1c815f4b24a305e5bc9eceb541674bf4d02b709.tar.xz
soundwire: intel: Fix uninitialized adev deref
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: Dan Carpenter <dan.carpenter@oracle.com> Acked-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Signed-off-by: Vinod Koul <vkoul@kernel.org>
Diffstat (limited to 'drivers/soundwire')
-rw-r--r--drivers/soundwire/intel_init.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/soundwire/intel_init.c b/drivers/soundwire/intel_init.c
index d1ea6b4d0ad3..5c8a20d99878 100644
--- a/drivers/soundwire/intel_init.c
+++ b/drivers/soundwire/intel_init.c
@@ -151,7 +151,7 @@ static acpi_status sdw_intel_acpi_cb(acpi_handle handle, u32 level,
struct acpi_device *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;
}