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 Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 5F9E0CDB474 for ; Mon, 23 Oct 2023 11:51:24 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234657AbjJWLvY (ORCPT ); Mon, 23 Oct 2023 07:51:24 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60996 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234638AbjJWLvQ (ORCPT ); Mon, 23 Oct 2023 07:51:16 -0400 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E3E04F5 for ; Mon, 23 Oct 2023 04:51:13 -0700 (PDT) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 02A1DC433C7; Mon, 23 Oct 2023 11:51:12 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1698061873; bh=1EXNdGrHwMEiSpxZwgGs5dkdfT52Ctj7wWguDQ+YHO8=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=e/0e4RPOF1JSu+rJ6E+eqT6Yhsnop4MFMHh3wxCzQZWLMCNAIlD4BohZkfEf8Cs04 wE3vERGyOg6kEWZTPlHgWYLpXcI+x18pihYcEZVggCLlsZpZTiszMqSohL9W5ifePM Y6dp3mncr71z1ssmsi/A/k/ponvpqj8Mh8xCEGKs= From: Greg Kroah-Hartman To: stable@vger.kernel.org Cc: Greg Kroah-Hartman , patches@lists.linux.dev, Dan Carpenter , Mark Brown , Sasha Levin Subject: [PATCH 5.10 194/202] ASoC: pxa: fix a memory leak in probe() Date: Mon, 23 Oct 2023 12:58:21 +0200 Message-ID: <20231023104832.099642588@linuxfoundation.org> X-Mailer: git-send-email 2.42.0 In-Reply-To: <20231023104826.569169691@linuxfoundation.org> References: <20231023104826.569169691@linuxfoundation.org> User-Agent: quilt/0.67 X-stable: review X-Patchwork-Hint: ignore MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: stable@vger.kernel.org 5.10-stable review patch. If anyone has any objections, please let me know. ------------------ From: Dan Carpenter [ Upstream commit aa6464edbd51af4a2f8db43df866a7642b244b5f ] Free the "priv" pointer before returning the error code. Fixes: 90eb6b59d311 ("ASoC: pxa-ssp: add support for an external clock in devicetree") Signed-off-by: Dan Carpenter Link: https://lore.kernel.org/r/84ac2313-1420-471a-b2cb-3269a2e12a7c@moroto.mountain Signed-off-by: Mark Brown Signed-off-by: Sasha Levin --- sound/soc/pxa/pxa-ssp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sound/soc/pxa/pxa-ssp.c b/sound/soc/pxa/pxa-ssp.c index c4e7307a44374..d847263a18b93 100644 --- a/sound/soc/pxa/pxa-ssp.c +++ b/sound/soc/pxa/pxa-ssp.c @@ -797,7 +797,7 @@ static int pxa_ssp_probe(struct snd_soc_dai *dai) if (IS_ERR(priv->extclk)) { ret = PTR_ERR(priv->extclk); if (ret == -EPROBE_DEFER) - return ret; + goto err_priv; priv->extclk = NULL; } -- 2.42.0