From patchwork Tue Aug 7 06:41:13 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Vinod Koul X-Patchwork-Id: 10558267 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 9CBB613B4 for ; Tue, 7 Aug 2018 06:41:57 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 880C529381 for ; Tue, 7 Aug 2018 06:41:57 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 7982C29806; Tue, 7 Aug 2018 06:41:57 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.8 required=2.0 tests=BAYES_00,DKIM_SIGNED, MAILING_LIST_MULTI,RCVD_IN_DNSWL_NONE,T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 423DD29381 for ; Tue, 7 Aug 2018 06:41:55 +0000 (UTC) Received: from alsa0.perex.cz (localhost [127.0.0.1]) by alsa0.perex.cz (Postfix) with ESMTP id 7AF0B26786B; Tue, 7 Aug 2018 08:41:53 +0200 (CEST) X-Original-To: alsa-devel@alsa-project.org Delivered-To: alsa-devel@alsa-project.org Received: by alsa0.perex.cz (Postfix, from userid 1000) id 5810D26786D; Tue, 7 Aug 2018 08:41:51 +0200 (CEST) Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by alsa0.perex.cz (Postfix) with ESMTP id 49E8E26786A for ; Tue, 7 Aug 2018 08:41:48 +0200 (CEST) Received: from localhost.localdomain (unknown [122.167.122.62]) (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 21D9E21A0D; Tue, 7 Aug 2018 06:41:44 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1533624107; bh=gCBe4huxFdXy8cjt47qsSjfJblW9idBnIQpZffTb0mA=; h=From:To:Cc:Subject:Date:From; b=B/FBk6JXCLAJ50lyWGDM+CwAZ6eJjuWeQr+eyc78x97MD//B23/O9FZRqR9ywkYjn Aki0OQiqdJUSScfKk1b/A9SKQAYl6V3uHC9oE1crTE1vt1GOj4dptayBsv320AVI5A xmnDP1VxGTRnMZ9ZdxaGmudLBHcpDsUnz+P/VLFY= From: Vinod Koul To: alsa-devel@alsa-project.org Date: Tue, 7 Aug 2018 12:11:13 +0530 Message-Id: <20180807064113.8114-1-vkoul@kernel.org> X-Mailer: git-send-email 2.14.4 Cc: Vinod Koul , Sanyog Kale , Pierre-Louis Bossart , dan.carpenter@oracle.com, Shreyas NC Subject: [alsa-devel] [PATCH] soundwire: intel: Fix uninitialized adev deref X-BeenThere: alsa-devel@alsa-project.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: alsa-devel-bounces@alsa-project.org Sender: alsa-devel-bounces@alsa-project.org X-Virus-Scanned: ClamAV using ClamSMTP 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 Signed-off-by: Vinod Koul Acked-by: Pierre-Louis Bossart --- 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 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; }