From patchwork Thu Apr 27 10:59:58 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 9702743 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 59392602CC for ; Thu, 27 Apr 2017 11:07:21 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 5EDF8285E5 for ; Thu, 27 Apr 2017 11:07:21 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 538A5285EB; Thu, 27 Apr 2017 11:07:21 +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=-1.9 required=2.0 tests=BAYES_00, RCVD_IN_DNSWL_NONE 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 75849285E5 for ; Thu, 27 Apr 2017 11:07:20 +0000 (UTC) Received: from alsa0.perex.cz (localhost [127.0.0.1]) by alsa0.perex.cz (Postfix) with ESMTP id 8E88B266BA6; Thu, 27 Apr 2017 13:00:00 +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 BBDB02671A8; Thu, 27 Apr 2017 12:59:58 +0200 (CEST) Received: from mout.kundenserver.de (mout.kundenserver.de [212.227.126.187]) by alsa0.perex.cz (Postfix) with ESMTP id 3F612266483 for ; Thu, 27 Apr 2017 12:59:54 +0200 (CEST) Received: from wuerfel.lan ([78.42.17.5]) by mrelayeu.kundenserver.de (mreue001 [212.227.15.129]) with ESMTPA (Nemesis) id 0MW3dQ-1dafR829xQ-00X7Wi; Thu, 27 Apr 2017 12:59:42 +0200 From: Arnd Bergmann To: Liam Girdwood , Mark Brown , Jaroslav Kysela , Takashi Iwai Date: Thu, 27 Apr 2017 12:59:58 +0200 Message-Id: <20170427110014.2316664-1-arnd@arndb.de> X-Mailer: git-send-email 2.9.0 X-Provags-ID: V03:K0:j495f8R0XuL0pLTkJYIs71JmjABMFVaSI+bj5i3S4sXF49lncNm DNhomschYADY2OwfcuV0Udr4QQSmVDwF9ecwqjAcbRpWSUM8Qe7ZZm5adPXSRYe9BLw+1Bh AYn/hZS+DlrqA8BHmLMPI7MwMbSHvgD3nW7m/qJuVVsAwueJbq/7FZhS8XHL8bk2XDYOC1O BYx/yl6IJObtSOT5IOaUQ== X-UI-Out-Filterresults: notjunk:1; V01:K0:oKck1Id7X+E=:dKDfJLQeYD5Alhfo3xWNGb b1Sw4B6MqoO+o0XqNcR+tYikRwVE6UNwyyYzUTnlwLNUpMLCstSB17U/vljVQSxSIeTmI8N8E FW7as5Be4uAFxkDNnvVu8cnuuz3OkLqem3c6a1X/aRj6YO7libfOUHbIasqEZUukotKm2LbqM Ex33nfy8sxaSp/85O+hcfZWoe83H1h0vqokoJFwXo6VzQdkxffSVCMTRUrF8SuH8b/EQVPq5+ N9LMrsJJvx7cU8Alt6qOGD2YG78IQhkifawQj/5ZvnXbu8JUo+y8/Jp+xMmyoaZmqSv91kDdt +DqBFnrCU39IK+CopGsuFbw4+8sR8wyNl/BJhYPb/kLVUGzBEJjc/M5FtPwKjkkCn34x3Wzw8 617bISAdLmoph0l4C13gC3SgoUUo0yAKtf1n5IbIY+UIYMRK9GuV1qB1cJLBBw7mrug4ZK6kX 4Dh9/Lg/WADQOzNbAzc4fhM7TKEst/zXaxsPrcCL1MDBOWJP2UZYOaKv+ar0pLSRoMBnUQJda bIZjU6enQSl6oOmmyUke2VsohJBInKWy7KL+kmI3nZMW8xN3zraUS+By+XhgCYtb2eMf1R2Nc rs7byK0R42L6OmdkrRAKpGhotTP7+5uN7+hgsZupFgIuG4/8e3IFr3hJci90kxjGr8GuuoYno xhniw2r086aLgvBlh34KHPgemP+DxYvn/V72YXRgn48h0vjLygeo0iDZ7+gUb+htm6/E= Cc: alsa-devel@alsa-project.org, Arnd Bergmann , Vinod Koul , Jayachandran B , linux-kernel@vger.kernel.org, Ramesh Babu , G Kranthi , Senthilnathan Veppur , Jeeja KP , "Subhransu S. Prusty" Subject: [alsa-devel] [PATCH] ASoC: Intel: Skylake: fix uninitialized pointer use 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 The error handling in bxt_sst_dsp_init() got changed in a way that it now derefences an uninitialized pointer when printing a warning about the device not being found: sound/soc/intel/skylake/bxt-sst.c: In function 'bxt_sst_dsp_init': sound/soc/intel/skylake/bxt-sst.c:567:14: error: 'skl' may be used uninitialized in this function [-Werror=maybe-uninitialized] As we do have a valid device pointer available at the call site, let's use that instead. Fixes: 9fe9c7119283 ("ASoC: Intel: Skylake: Move sst common initialization to a helper function") Signed-off-by: Arnd Bergmann Reviewed-by: Takashi Sakamoto --- sound/soc/intel/skylake/bxt-sst.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sound/soc/intel/skylake/bxt-sst.c b/sound/soc/intel/skylake/bxt-sst.c index fde4bc0f35b0..f5e7dbb1ba39 100644 --- a/sound/soc/intel/skylake/bxt-sst.c +++ b/sound/soc/intel/skylake/bxt-sst.c @@ -564,7 +564,7 @@ int bxt_sst_dsp_init(struct device *dev, void __iomem *mmio_base, int irq, ret = skl_sst_ctx_init(dev, irq, fw_name, dsp_ops, dsp, &skl_dev); if (ret < 0) { - dev_err(skl->dev, "%s: no device\n", __func__); + dev_err(dev, "%s: no device\n", __func__); return ret; }