Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp892460imu; Fri, 11 Jan 2019 10:55:31 -0800 (PST) X-Google-Smtp-Source: ALg8bN7ePxdCAPv0PuDyVgmpdt3dTJTZuD+JHxxhQvjk+YLzA+4y0YqpbH/YA/F3MJmize7QJZ9l X-Received: by 2002:a17:902:8ec8:: with SMTP id x8mr15900296plo.210.1547232931312; Fri, 11 Jan 2019 10:55:31 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1547232931; cv=none; d=google.com; s=arc-20160816; b=x1An5GrazxjnAZX8JC8W4fh8lO6qMqB4gQqgMYIdp5/s8J/GVdhTjBYJKnE20yIStK zItQg3M/U85mergGaY6cpz7Varj6cXpoG7LKsWxUk8orGtMsrD37a0DU195JH9SaXdeZ /BvfIJJ+WNCTok7PeJX3nM0tzPZaOrMGfQAgQim3GVUlZSNhRjhTFuDD7JrS0r8jbtKL r5/frisRRvaZV20em5JtTOFL6DNEKH7vBhUfLAqlXvw/Gu7hoaJfdg8h10yqDm+tiyv2 99j9uvDz1bqdVZwpresUrYFV3Znr61Is6K9W6V2jlQ0F4JuqT7zI7xPU2WW8ps3EamRW 5+/Q== 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=G4kp85Pn7EIK8aF6QwTIacRAKTp8Qidf3LaWwBKAKVU=; b=Jto7M+tu/oRXzLhJJlWp661xfsGO9TUWsYXRUUwfGmJa64gg5WULV85rEgbEaXgwiu wMjXlcRPkIt3J3k077SY+P8O6aazz9XnG8IKp3cQELCS6+UWgenhjoJO6HbluX1VAFOE 8B5ejcVreZCN7ro68i+BTonVigRXmVpiO8/zw3R8/W5gIHdPED9gFXkgG4UslQsCb4nJ vgstZdn+rgVquGhC7L/CrCWpZ4Xc6ezv3mB8N23Vfdqaa8Ik/aQdbVBGrqBezam38Fm1 fiVUG5mS+Bc3ZqFVBo/4CzVxwJYKX/uRyzb2U33TUvSpzcg5eZduR7BcCZRhQj5iFdlh xP+Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=GLCr6MX2; 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 o10si22339788pgg.373.2019.01.11.10.55.16; Fri, 11 Jan 2019 10:55:31 -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=GLCr6MX2; 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 S2388036AbfAKOTd (ORCPT + 99 others); Fri, 11 Jan 2019 09:19:33 -0500 Received: from mail.kernel.org ([198.145.29.99]:36474 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731776AbfAKOT2 (ORCPT ); Fri, 11 Jan 2019 09:19:28 -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 3DB5C2183F; Fri, 11 Jan 2019 14:19:27 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1547216367; bh=wQ8NCEzr1QqEFzYRdWiQLYZD93QPD/iexOizbwwrBLg=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=GLCr6MX24/CK8cI4rqVzklkC5rzEo5RnYsIYCBnfu+F3/nfTaOZyV2a1ka9iwN4uN Cn44zDSqGPyUhZYIT2pqAnVcsGUSWvinWwXzw1BDSymubIjAwmLCb7MPQYI7gCSfnF 4bdM+8cAd9T7+ApuZOvhCrdqmpnaQXUIXXyig5y4= 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.4 73/88] ALSA: cs46xx: Potential NULL dereference in probe Date: Fri, 11 Jan 2019 15:08:42 +0100 Message-Id: <20190111131058.238706172@linuxfoundation.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190111131045.137499039@linuxfoundation.org> References: <20190111131045.137499039@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.4-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 @@ -899,6 +899,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;