From patchwork Tue Nov 19 05:13:56 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Greg KH X-Patchwork-Id: 179632 Delivered-To: patch@linaro.org Received: by 2002:a92:38d5:0:0:0:0:0 with SMTP id g82csp147529ilf; Mon, 18 Nov 2019 21:24:50 -0800 (PST) X-Google-Smtp-Source: APXvYqx60CPn0fhjz4PVP2aWrc5MtE2M78kXdOfgcLKS8x6TbD5k/20pZt9iBhpWr807OjQcVEF5 X-Received: by 2002:a17:906:f108:: with SMTP id gv8mr33157660ejb.180.1574141089902; Mon, 18 Nov 2019 21:24:49 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1574141089; cv=none; d=google.com; s=arc-20160816; b=fGMaimg6qO++cvf1F+AaUYBNWfIwxeoYuuLX/oKkgXv0uwwYXKHJKF8iYW4r6cxpYE GC9BSd0FOt0yO6wa0EkA6d5XCTYZx8K7bKfrqhSEKb/537YY24jdge5TBG4XOjy3RoDH 5ADHQdYDxjMeWjjABDpSS9c+LkYGDIfF9tkjr7R9GrQsnno9sZSdaC3AXW4Fq3YPJE+E dEyfnWaW9Hyj3TQvCmPeYrhpDvu941mHPTaWzQS9mCUQf9m/QPDMrTxXqWRte9t9/n/O INGHTEHa1si9cPmOwojFREAdIWkfRWEa3+Ju4Y+DWmYeyJB5qWatdGpJYyVzOjNMNU+t m1kg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=Qzlm3O00gTMY7lIsp7L5uneza3a5NLlK20KUBf3H4oQ=; b=S4toguCGftWFcDqcVIZ4GwsVT/PsU80SwzRpgcmfTHda+5D1jpik8ZQSwRPdhZviFp c31LbkjcRDZOKKaLRPpy8oltQGreQHwH/OWQjvQlUA0BwTOv68I+7i3+e1ZuI6ojEotu LE7DHvk6Amo2NGstwHNZWH9hEbiW9U6GGpIcPK++MFipvXPwZDgIW+IwWzXeZ3ItMS7z UptghoUhkM3etl5Tppi4Yl7Y+APv259IrUeRX6HohHJpG9OTlFGY+bLrBMJwexIXkuYS +WXvxTjXW9QFedhKWwjoV72XXBEDLo2AiiJ8uiLPVMRiBeES53vRangDKAjkkkjxEAS0 1+zw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=rMKSqgfh; spf=pass (google.com: best guess record for domain of stable-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=stable-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id q30si15938192edb.372.2019.11.18.21.24.49; Mon, 18 Nov 2019 21:24:49 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of stable-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=rMKSqgfh; spf=pass (google.com: best guess record for domain of stable-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=stable-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728270AbfKSFYr (ORCPT + 15 others); Tue, 19 Nov 2019 00:24:47 -0500 Received: from mail.kernel.org ([198.145.29.99]:41172 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728254AbfKSFYr (ORCPT ); Tue, 19 Nov 2019 00:24:47 -0500 Received: from localhost (83-86-89-107.cable.dynamic.v4.ziggo.nl [83.86.89.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 0FC9C21783; Tue, 19 Nov 2019 05:24:45 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1574141086; bh=nL257+5kU0ZhATbuvvRos00sxXWABvhtjW0o5lB36dE=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=rMKSqgfh2ZOf0emicRaB4DK2+hnNoTYzHYoN90wSZqy8hw0YQMHP8Lw6xMD8Ydccn qryn5I98IGYwukZKsK+aW4YXrA9YRuJgpjJ4IpEEW7QD0HZQkKWJ85RbUvyy3nVVGh jeqpuMgkFo7kDRRgncG0LEZLkhc4a1KejPaAVvmI= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Dan Carpenter , Pierre-Louis Bossart , Vinod Koul , Sasha Levin Subject: [PATCH 4.19 039/422] soundwire: intel: Fix uninitialized adev deref Date: Tue, 19 Nov 2019 06:13:56 +0100 Message-Id: <20191119051402.493920522@linuxfoundation.org> X-Mailer: git-send-email 2.24.0 In-Reply-To: <20191119051400.261610025@linuxfoundation.org> References: <20191119051400.261610025@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Sender: stable-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: stable@vger.kernel.org From: Vinod Koul [ 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 Acked-by: Pierre-Louis Bossart Signed-off-by: Vinod Koul Signed-off-by: Sasha Levin --- drivers/soundwire/intel_init.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- 2.20.1 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; }