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=-10.5 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SIGNED_OFF_BY, 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 EC5E8C43387 for ; Fri, 11 Jan 2019 14:22:25 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id B1BC12177B for ; Fri, 11 Jan 2019 14:22:25 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1547216545; bh=wQ8NCEzr1QqEFzYRdWiQLYZD93QPD/iexOizbwwrBLg=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-ID:From; b=BVyy6a54CXGlZvI4fgRA1+uatYNq0faS1RQ3TM0Hq9XahYZ2TjtVqOfm1LCXvjR2M 6OA82LY0JyU56MHfK49PDgnXSgRbiYF9eIaKyQ/hJJobaEZwViDZJ4zG6ghSCjvtOs wO/nfRJSW8sOxKFd2CnBgMElT41hYEbUgIMnxiF8= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731847AbfAKOT3 (ORCPT ); Fri, 11 Jan 2019 09:19:29 -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: stable-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: stable@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;