From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.8 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SIGNED_OFF_BY, SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 4E4C0C32792 for ; Thu, 3 Oct 2019 16:05:19 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 19878222BE for ; Thu, 3 Oct 2019 16:05:19 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1570118719; bh=PISx2vyocSh8/A1YRwQdwLjLxS9DHcEQhiIdSzWqr9g=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-ID:From; b=FIbV0twJorAuV/T2xTqKL90f7CurqYcjJhclLMPxAwkQvYUidF+jDn2VTcEu8ku64 TegU0APAjMqDIiq6XgIByw+VtUJqD61Qk8XILzUaWMoM43PHs5s9QCXL2cid3At+xS sonexeRNRwVjkY4Vp0CthU6gKXhj0BMcSvpj+LOg= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1732195AbfJCQFS (ORCPT ); Thu, 3 Oct 2019 12:05:18 -0400 Received: from mail.kernel.org ([198.145.29.99]:51766 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730633AbfJCQFN (ORCPT ); Thu, 3 Oct 2019 12:05:13 -0400 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 AB3B2215EA; Thu, 3 Oct 2019 16:05:12 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1570118713; bh=PISx2vyocSh8/A1YRwQdwLjLxS9DHcEQhiIdSzWqr9g=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=T5H5JHnylKqzXz6RyD1fTq03QzNWZZ9tutEY3R45swuztUr+4on0WQ8TlT3wtChAP 7YLd3Nt1cJwAKRGd9UYsEa+m7l+lpMH36PJjsoPT14n3C59tTOvHDAGz2pgLsc9Jem EgFWxm33MP31Jbfy+6ni7XqX7rKBfHSo5BS88mUo= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, =?UTF-8?q?Amadeusz=20S=C5=82awi=C5=84ski?= , Pierre-Louis Bossart , Mark Brown Subject: [PATCH 4.9 110/129] ASoC: Intel: Fix use of potentially uninitialized variable Date: Thu, 3 Oct 2019 17:53:53 +0200 Message-Id: <20191003154409.194095223@linuxfoundation.org> X-Mailer: git-send-email 2.23.0 In-Reply-To: <20191003154318.081116689@linuxfoundation.org> References: <20191003154318.081116689@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Amadeusz Sławiński commit 810f3b860850148788fc1ed8a6f5f807199fed65 upstream. If ipc->ops.reply_msg_match is NULL, we may end up using uninitialized mask value. reported by smatch: sound/soc/intel/common/sst-ipc.c:266 sst_ipc_reply_find_msg() error: uninitialized symbol 'mask'. Signed-off-by: Amadeusz Sławiński Link: https://lore.kernel.org/r/20190827141712.21015-3-amadeuszx.slawinski@linux.intel.com Reviewed-by: Pierre-Louis Bossart Signed-off-by: Mark Brown Cc: stable@vger.kernel.org Signed-off-by: Greg Kroah-Hartman --- sound/soc/intel/common/sst-ipc.c | 2 ++ 1 file changed, 2 insertions(+) --- a/sound/soc/intel/common/sst-ipc.c +++ b/sound/soc/intel/common/sst-ipc.c @@ -211,6 +211,8 @@ struct ipc_message *sst_ipc_reply_find_m if (ipc->ops.reply_msg_match != NULL) header = ipc->ops.reply_msg_match(header, &mask); + else + mask = (u64)-1; if (list_empty(&ipc->rx_list)) { dev_err(ipc->dev, "error: rx list empty but received 0x%llx\n",