From patchwork Tue Jun 23 19:54:33 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Greg Kroah-Hartman X-Patchwork-Id: 223491 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.0 required=3.0 tests=DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH, 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 4D01FC433E2 for ; Tue, 23 Jun 2020 20:24:18 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 2246D20780 for ; Tue, 23 Jun 2020 20:24:18 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1592943858; bh=2LOyHQ+/8OZ0Nmv1IprYRebKruQPFAgnj8SSRPMWDXE=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-ID:From; b=JHlXWs47mHxEgo95w8p/JHOG5gthxszZwH6zz77K+kRqbvVrU9DoYNkEn7wSEevbq Mh0pw1pLaa5wUqq6MLPMWaKDqGNygREH3DcygckTgX+Xoos+l0BHl2g5770WvaBLsW gU6HrS1OP7ZUeCssl5JGPjUL7Wnpaj1qRaRCo97Q= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2390396AbgFWUYQ (ORCPT ); Tue, 23 Jun 2020 16:24:16 -0400 Received: from mail.kernel.org ([198.145.29.99]:42784 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2390393AbgFWUYP (ORCPT ); Tue, 23 Jun 2020 16:24:15 -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 243582064B; Tue, 23 Jun 2020 20:24:14 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1592943855; bh=2LOyHQ+/8OZ0Nmv1IprYRebKruQPFAgnj8SSRPMWDXE=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=pk35o0vGJ7X+pWw8wLS0zzFL2p9ujvitMo0z+Z1pFytfTdKxR/r+VAmh0pQmTV80i 942bRJ16TA3OnAQDFc8YFlw/nRzl5OUUdc1hR5UzQGFF/L3k7SGqHw+BAWlIQb2QT0 EqElaj3IZo36i1OLZt0wh/vmK11ABqln843k7/ls= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, "Pavel Machek (CIP)" , Jerome Brunet , Mark Brown , Sasha Levin Subject: [PATCH 5.4 078/314] ASoC: meson: add missing free_irq() in error path Date: Tue, 23 Jun 2020 21:54:33 +0200 Message-Id: <20200623195342.577366029@linuxfoundation.org> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20200623195338.770401005@linuxfoundation.org> References: <20200623195338.770401005@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Sender: stable-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: stable@vger.kernel.org From: Pavel Machek (CIP) [ Upstream commit 3b8a299a58b2afce464ae11324b59dcf0f1d10a7 ] free_irq() is missing in case of error, fix that. Signed-off-by: Pavel Machek (CIP) Reviewed-by: Jerome Brunet Link: https://lore.kernel.org/r/20200606153103.GA17905@amd Signed-off-by: Mark Brown Signed-off-by: Sasha Levin --- sound/soc/meson/axg-fifo.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/sound/soc/meson/axg-fifo.c b/sound/soc/meson/axg-fifo.c index d286dff3171d2..898ef1d5608f9 100644 --- a/sound/soc/meson/axg-fifo.c +++ b/sound/soc/meson/axg-fifo.c @@ -244,7 +244,7 @@ static int axg_fifo_pcm_open(struct snd_pcm_substream *ss) /* Enable pclk to access registers and clock the fifo ip */ ret = clk_prepare_enable(fifo->pclk); if (ret) - return ret; + goto free_irq; /* Setup status2 so it reports the memory pointer */ regmap_update_bits(fifo->map, FIFO_CTRL1, @@ -264,8 +264,14 @@ static int axg_fifo_pcm_open(struct snd_pcm_substream *ss) /* Take memory arbitror out of reset */ ret = reset_control_deassert(fifo->arb); if (ret) - clk_disable_unprepare(fifo->pclk); + goto free_clk; + + return 0; +free_clk: + clk_disable_unprepare(fifo->pclk); +free_irq: + free_irq(fifo->irq, ss); return ret; }