Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp646514imu; Fri, 11 Jan 2019 06:44:54 -0800 (PST) X-Google-Smtp-Source: ALg8bN5HGuYMtGMIfxpmbMesTTidyCJpHuQLK9AsYOGE0YKtw5K5aQzeDKYcIT5/8dUWOdAHiCW0 X-Received: by 2002:a62:1a91:: with SMTP id a139mr15327838pfa.64.1547217893906; Fri, 11 Jan 2019 06:44:53 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1547217893; cv=none; d=google.com; s=arc-20160816; b=kVKRokwTb0w13uvkBMSsU7ePrYS4qHeS0mW7G7rYhGcs+8ulut+luHcjd+74r3K9Li njVOn/Q9oziSlN//cbxuJ4ml4aq0Wid6Z+eonLvOXFkSJ0XwwGSkDbQuprTpqXzDI+1U y2xqErLmq5ZV+UZE/ayf7wVsBCK5P2DQUIS89WiOXRsIvgDR3S6WLFEuE89aS/0LhROs wt/aKFhl9obZfahAroew75th5iopfmqiWhK39k1oFeZ3FV4Aq3jUnV3eGgPQFCkIfo7T 5433uvH+yhixnGsnftqo2BotATyUzEhXH5KVJsAXrLOAuAlH1QXfpOK4ZbPhwXcjTsci hGkQ== 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=0pVdpjXjKSiXm7KD4WQehpVwU+Pe0BTQF5iKEp8f6Hg=; b=Vsnz+plQw604YgJo1nB9EcHnHaqL9RPnDX8VnyNqFXM9cxi1AacZ4nyhok5z9WFmBB Biv0nMgswlBzm//MsNF0VEGzV6fsobtG9LvpflBNCMGUPKo77uZnIlN+sCGiarZ5SMFd dMmhgi3XblZm6bOYqqS7ERaQHC3pFDbBdzGo/9oS1l2A6Mjv/LfR6bFBSEr/FbfAouSF sFQJ5Of+HYV58TQZm05qXjYg1oxRi2FZhryOBRHFeuKo1C+kNzseJ7t2+vdZlxLs3R7h 9zXDfVlWoOpZdKZqey2fLIweC7l/vWhPVuBBeTEJrGi5mxTdkJI8IKDON07SkhybqCFN 5ocA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=lmdsmPp4; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-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 o10si21809831pgg.373.2019.01.11.06.44.38; Fri, 11 Jan 2019 06:44:53 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-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=lmdsmPp4; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2404109AbfAKOmE (ORCPT + 99 others); Fri, 11 Jan 2019 09:42:04 -0500 Received: from mail.kernel.org ([198.145.29.99]:34848 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2404087AbfAKOmD (ORCPT ); Fri, 11 Jan 2019 09:42:03 -0500 Received: from localhost (5356596B.cm-6-7b.dynamic.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 7E7902063F; Fri, 11 Jan 2019 14:42:02 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1547217723; bh=QTnkRTV2wSTHEL2lhvUue0jDvzOYH1z1ZDZfq1L+v94=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=lmdsmPp4hU0teybrzho6C4WaWzjDtB1bxUqR77cBZpYgfwwajI10zy4YtIAax2KmK q+rh/vIg9guyzTmOipGhYYnWi/P1Jtsomk3CxIBTfd5kr3OYjYZCFu/XY+IdJxhk12 dMJbQtf172/ebXWWNyLFXMBaOPpF9lCcfCoYai7E= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, "Yavuz, Tuba" , Dan Carpenter , Takashi Iwai Subject: [PATCH 4.20 18/65] ALSA: cs46xx: Potential NULL dereference in probe Date: Fri, 11 Jan 2019 15:15:04 +0100 Message-Id: <20190111131058.926421362@linuxfoundation.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190111131055.331350141@linuxfoundation.org> References: <20190111131055.331350141@linuxfoundation.org> User-Agent: quilt/0.65 X-stable: review X-Patchwork-Hint: ignore 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 4.20-stable review patch. If anyone has any objections, please let me know. ------------------ From: Dan Carpenter commit 1524f4e47f90b27a3ac84efbdd94c63172246a6f upstream. The "chip->dsp_spos_instance" can be NULL on some of the ealier error paths in snd_cs46xx_create(). Reported-by: "Yavuz, Tuba" Signed-off-by: Dan Carpenter Cc: Signed-off-by: Takashi Iwai Signed-off-by: Greg Kroah-Hartman --- sound/pci/cs46xx/dsp_spos.c | 3 +++ 1 file changed, 3 insertions(+) --- a/sound/pci/cs46xx/dsp_spos.c +++ b/sound/pci/cs46xx/dsp_spos.c @@ -903,6 +903,9 @@ int cs46xx_dsp_proc_done (struct snd_cs4 struct dsp_spos_instance * ins = chip->dsp_spos_instance; int i; + if (!ins) + return 0; + snd_info_free_entry(ins->proc_sym_info_entry); ins->proc_sym_info_entry = NULL;