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,URIBL_BLOCKED,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 2B27CC43387 for ; Fri, 11 Jan 2019 14:51:27 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id E70A02063F for ; Fri, 11 Jan 2019 14:51:26 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1547218287; bh=q6ht3diwawcEgRlnQnYtil7RCWaXnTiAYf+FPwRNsOo=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-ID:From; b=Nz336zJaDAL5p/41bgRKYoXPxTuOEzHYQsTWw3dw4fdGboJYuGokoiEwJFk5maZ9o iL7WnP0vjmePx7VrhWLI+tMfevEXddBk1peozNdBsGxXgVThEM/MbYEb0JEyhtMPdr S38BTQBn9YBUb5AttYFo32BrTYl0u5Y6xW6T0psc= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2403813AbfAKOje (ORCPT ); Fri, 11 Jan 2019 09:39:34 -0500 Received: from mail.kernel.org ([198.145.29.99]:60410 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2403807AbfAKOje (ORCPT ); Fri, 11 Jan 2019 09:39:34 -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 0CA2F2133F; Fri, 11 Jan 2019 14:39:32 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1547217573; bh=q6ht3diwawcEgRlnQnYtil7RCWaXnTiAYf+FPwRNsOo=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=KTjN6ierxgxLpQBSlrfsLOFZRs9KWzgF4bAeo/je+/WS9xDrB8ZhPYJbmmMAPdVpQ +N792DMWzlWs4QMHp5/McplsGyBm6LkFIepP+evTb8JTu7BSHgXVn5chcqXiQMKvuq GrfvSUL+RsY7IVOM96Nn7/KqK74LkmcK06MNN29A= 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.19 104/148] ALSA: cs46xx: Potential NULL dereference in probe Date: Fri, 11 Jan 2019 15:14:42 +0100 Message-Id: <20190111131118.379539434@linuxfoundation.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190111131114.337122649@linuxfoundation.org> References: <20190111131114.337122649@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.19-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;