Received: by 2002:a25:683:0:0:0:0:0 with SMTP id 125csp3882441ybg; Sun, 7 Jun 2020 13:46:05 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzFNbY7LL8MzkyzuPB311HwZ8a0f+K/rxVPy5v1O0A+/u73sBxFshlgkaPlwCwpDWr4sg8H X-Received: by 2002:aa7:d6c1:: with SMTP id x1mr14835045edr.154.1591562764814; Sun, 07 Jun 2020 13:46:04 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1591562764; cv=none; d=google.com; s=arc-20160816; b=rtQzMbgNtdovM1bnimQgpIqJbzwb1py7Il8twSwHz/zY5MGAM8UpkZCMITQkPNO7Cb wi6WeCD9A0CMtAnaV9AmAUgM//apIN3LhZkc4hAu3DF3S2Q/dS01Cm5W1pvpFiwD/Kuf yh6v+3qXBb3Ezi8f+eCY5LlrtRqHFxqvurxCnoLA6VW4UL/xyNXHQVErte4zrcwku6wt kocBzgAdF9z5UEqqZ7jHZsq+4OvV6jllhHLJ4ou7/rUOOwpI/c3Dvj0NfdOzQX/KEEFI UOyembr8+FRMlnNMfPQrH9q0hwpogntpHmJG7FVd4CEQnPIMopvkw3CaIx4id9Nhea1M h3jA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:message-id:date:in-reply-to :subject:to:from:user-agent:references:dkim-signature; bh=lZvTa+fi3q1fHKnC1NQ/5Z2Ndj1/0QXtbAGtm+dp8V4=; b=EK7LNl1WMopZCkFTZWmnZHkaEARYX4p8R+VrOXKzfzMUylIZC9QDPsCk+y2FnyMlqj b516QGV5Ty83r3Zom78pO70vrU2ywZaSnEOcuSoi77lwKcZjWI1IytV8Kkr2Np6piZn5 2ZGYlXxXz7pvVb1ykVUPDTKrEnHh7QGsZM41l6LVRp4W9iGBgm5GdfXaM9Kwkd9RYfvQ 5cHK63adxEIX9BVPxyjViBVu6rgJvkoyyBgzm/nLfpPZk/dUvXOxQEDmBedH/LIpa+Qi yxI8Sl9uU7LoFySTkMi4e+pjguLtQcOzV+zSKktc45vDjpZpvE6m8gJi8Jr7qtFFF/R3 69mQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@baylibre-com.20150623.gappssmtp.com header.s=20150623 header.b=XA88GXBC; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id u24si7788989ejo.396.2020.06.07.13.45.41; Sun, 07 Jun 2020 13:46:04 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@baylibre-com.20150623.gappssmtp.com header.s=20150623 header.b=XA88GXBC; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727783AbgFGUnY (ORCPT + 99 others); Sun, 7 Jun 2020 16:43:24 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45212 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726093AbgFGUnX (ORCPT ); Sun, 7 Jun 2020 16:43:23 -0400 Received: from mail-wr1-x441.google.com (mail-wr1-x441.google.com [IPv6:2a00:1450:4864:20::441]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3C29EC08C5C3 for ; Sun, 7 Jun 2020 13:43:22 -0700 (PDT) Received: by mail-wr1-x441.google.com with SMTP id r7so15276438wro.1 for ; Sun, 07 Jun 2020 13:43:22 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=baylibre-com.20150623.gappssmtp.com; s=20150623; h=references:user-agent:from:to:subject:in-reply-to:date:message-id :mime-version; bh=lZvTa+fi3q1fHKnC1NQ/5Z2Ndj1/0QXtbAGtm+dp8V4=; b=XA88GXBCMwRC8ua5Zu1G1aq1EuoHHamyB7XfFDreblLDNy9oepc7VRQ+RnWPezXhWu F/sI2GLdvWzRd2LxwU/Jh7tU/CChLMG1Oz3GnckfQo2g/B6LZUrz4IbKP5TR7QtIVryP y009CvtbXFo+0gbUCpZ3WN7kG1sYxQuZ8XxK70kTohvaJirXKC7V5/0kkvEcW9jYi2eS VZoAXCn1itpeEVSF8tIc0A3xYlXfV8sJN9jSgNaKkFxx6bfxFx3kCWUalLQnwP+M/9K8 DbYTUCE+VM14CJcRNr9eEBr+Fy6SoV9OEf9k/l86n4NH1qcTy4jSFhjhs/6CUxOfnA9d tQxQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:references:user-agent:from:to:subject :in-reply-to:date:message-id:mime-version; bh=lZvTa+fi3q1fHKnC1NQ/5Z2Ndj1/0QXtbAGtm+dp8V4=; b=amaC9eFtfajDr/efBgMvj4MF9tzq211sC5eJUn7lKkxZfIf6SXhWQE1nP+SpY2bWLT kS+XjlBuaaTNbw1LZfIkL5cUH8+6oz8Jcr42k+MCnJvcGO3nc4VEtsjrcXNcyCsZ10Gk LGPKsrhj3GaCWMckc4gZ7HfzKtxMPDUhye9hle2mIKJ8pHtjvjXmLV0d7ILiP+lWb42T TIMSjU4BqrB6MYAQX9suBzQOEdcFeom76YUHxznKxsf8NdFQ8REfR7G+eToUoqyWZmt9 tHxyCufXB/34qDMqBi3IvuqgdIN8sJmnOOWQ9V6jIRb5plgyEF6qEemDZ5/w2HarE74B L2VA== X-Gm-Message-State: AOAM532dCyby+rW3Yeh+SvlFyQSARt9LrHdnyrRoscDFW3KHVqCvbAl4 lsq9U24cYmImnXlYwlFfICkb4Q== X-Received: by 2002:a05:6000:11cd:: with SMTP id i13mr19363506wrx.141.1591562600771; Sun, 07 Jun 2020 13:43:20 -0700 (PDT) Received: from localhost (cag06-3-82-243-161-21.fbx.proxad.net. [82.243.161.21]) by smtp.gmail.com with ESMTPSA id j4sm21175221wma.7.2020.06.07.13.43.19 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 07 Jun 2020 13:43:20 -0700 (PDT) References: <20200606153103.GA17905@amd> User-agent: mu4e 1.3.3; emacs 26.3 From: Jerome Brunet To: Pavel Machek , lgirdwood@gmail.com, broonie@kernel.org, perex@perex.cz, tiwai@suse.com, khilman@baylibre.com, alsa-devel@alsa-project.org, linux-amlogic@lists.infradead.org, linux-kernel@vger.kernel.org, trivial@kernel.org Subject: Re: [PATCH] soc/meson: add missing free_irq() in error path In-reply-to: <20200606153103.GA17905@amd> Date: Sun, 07 Jun 2020 22:43:18 +0200 Message-ID: <1j5zc2k3o9.fsf@starbuckisacylon.baylibre.com> MIME-Version: 1.0 Content-Type: text/plain Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sat 06 Jun 2020 at 17:31, Pavel Machek wrote: > free_irq() is missing in case of error, fix that. > > Signed-off-by: Pavel Machek (CIP) Reviewed-by: Jerome Brunet > > diff --git a/sound/soc/meson/axg-fifo.c b/sound/soc/meson/axg-fifo.c > index 2e9b56b29d31..b2e867113226 100644 > --- a/sound/soc/meson/axg-fifo.c > +++ b/sound/soc/meson/axg-fifo.c > @@ -249,7 +249,7 @@ int axg_fifo_pcm_open(struct snd_soc_component *component, > /* 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, > @@ -269,8 +269,14 @@ int axg_fifo_pcm_open(struct snd_soc_component *component, > /* 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; > } > EXPORT_SYMBOL_GPL(axg_fifo_pcm_open);