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,URIBL_BLOCKED,USER_AGENT_GIT autolearn=ham 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 C1091C433DF for ; Tue, 16 Jun 2020 15:38:20 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 8D39A21531 for ; Tue, 16 Jun 2020 15:38:20 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1592321900; bh=338AucczY2mLow4d9IdceneS8Dm9fzEUvS1ZacGLH8w=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-ID:From; b=LaqfaQauXlqP18mBW5L6CTIa/uUwGZOT7Fw2zUfz7wWdwYAfdapgPPA3v7KT+XY34 BsrKmn3NVTHrpTs5orM7BSDV8wJvzrH2FfI7bs7c9Ma4sbqgFp+3x6mRDWyg5coDKH cTUbR3/IyajHUQ/uxGz4FOw8ftZafQVvJDWKYZaE= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730608AbgFPPiT (ORCPT ); Tue, 16 Jun 2020 11:38:19 -0400 Received: from mail.kernel.org ([198.145.29.99]:50314 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730552AbgFPPiJ (ORCPT ); Tue, 16 Jun 2020 11:38:09 -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 4A0E620C56; Tue, 16 Jun 2020 15:38:08 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1592321888; bh=338AucczY2mLow4d9IdceneS8Dm9fzEUvS1ZacGLH8w=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=WG5k+/gNvwmslUD03xANP6dOwfJDSbTiUvpnwhl9L4SH7FqHvOzLGnxR2+L56zBvS 5YG+ER5ulsOenjD4BWKJVuMdrgt/1A0i2tbH2KraRODo4MdujbAPlOMx1dbLUoa8l/ bA5LQV0gjdkJxlSA4klhJcvsnNAJIQrT+G/wb2AI= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Chuhong Yuan , Takashi Iwai Subject: [PATCH 5.4 055/134] ALSA: es1688: Add the missed snd_card_free() Date: Tue, 16 Jun 2020 17:33:59 +0200 Message-Id: <20200616153103.409759933@linuxfoundation.org> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20200616153100.633279950@linuxfoundation.org> References: <20200616153100.633279950@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: Chuhong Yuan commit d9b8fbf15d05350b36081eddafcf7b15aa1add50 upstream. snd_es968_pnp_detect() misses a snd_card_free() in a failed path. Add the missed function call to fix it. Fixes: a20971b201ac ("ALSA: Merge es1688 and es968 drivers") Signed-off-by: Chuhong Yuan Cc: Link: https://lore.kernel.org/r/20200603092459.1424093-1-hslester96@gmail.com Signed-off-by: Takashi Iwai Signed-off-by: Greg Kroah-Hartman --- sound/isa/es1688/es1688.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) --- a/sound/isa/es1688/es1688.c +++ b/sound/isa/es1688/es1688.c @@ -267,8 +267,10 @@ static int snd_es968_pnp_detect(struct p return error; } error = snd_es1688_probe(card, dev); - if (error < 0) + if (error < 0) { + snd_card_free(card); return error; + } pnp_set_card_drvdata(pcard, card); snd_es968_pnp_is_probed = 1; return 0;