[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20191108113752.12502-7-sashal@kernel.org>
Date: Fri, 8 Nov 2019 06:34:34 -0500
From: Sasha Levin <sashal@...nel.org>
To: linux-kernel@...r.kernel.org, stable@...r.kernel.org
Cc: Vinod Koul <vkoul@...nel.org>,
Dan Carpenter <dan.carpenter@...cle.com>,
Pierre-Louis Bossart <pierre-louis.bossart@...ux.intel.com>,
Sasha Levin <sashal@...nel.org>
Subject: [PATCH AUTOSEL 4.19 007/205] soundwire: intel: Fix uninitialized adev deref
From: Vinod Koul <vkoul@...nel.org>
[ Upstream commit e1c815f4b24a305e5bc9eceb541674bf4d02b709 ]
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@...cle.com>
Acked-by: Pierre-Louis Bossart <pierre-louis.bossart@...ux.intel.com>
Signed-off-by: Vinod Koul <vkoul@...nel.org>
Signed-off-by: Sasha Levin <sashal@...nel.org>
---
drivers/soundwire/intel_init.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/soundwire/intel_init.c b/drivers/soundwire/intel_init.c
index d1ea6b4d0ad30..5c8a20d998786 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;
}
--
2.20.1
Powered by blists - more mailing lists