From: Dan Carpenter <dan.carpenter@linaro.org>
To: Claudiu Beznea <claudiu.beznea@tuxon.dev>
Cc: Biju Das <biju.das.jz@bp.renesas.com>,
Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com>,
Liam Girdwood <lgirdwood@gmail.com>,
Mark Brown <broonie@kernel.org>, Jaroslav Kysela <perex@perex.cz>,
Takashi Iwai <tiwai@suse.com>,
linux-sound@vger.kernel.org, linux-renesas-soc@vger.kernel.org,
linux-kernel@vger.kernel.org, kernel-janitors@vger.kernel.org
Subject: Re: [PATCH] ASoC: renesas: rz-ssi: Clean up on error in probe()
Date: Mon, 20 Jan 2025 13:32:46 +0300 [thread overview]
Message-ID: <b8a7f1d6-be84-4387-9ef9-b6ec91da69f7@stanley.mountain> (raw)
In-Reply-To: <8ff70298-8a9c-4228-b064-f46ec81f6d15@tuxon.dev>
On Fri, Jan 17, 2025 at 01:51:55PM +0200, Claudiu Beznea wrote:
> > - if (ret < 0)
> > - return dev_err_probe(dev, ret,
> > - "irq request error (dma_rx)\n");
> > + if (ret < 0) {
> > + dev_err_probe(dev, ret,
> > + "irq request error (dma_rx)\n");
> > + goto err_release_dma_chs;
> > + }
> > }
> > }
>
> The code block ending here is entered only if !rz_ssi_is_dma_enabled(). If
> that is true there are no DMA channel to be released. Maybe better would be
> to move this code block on the failure path of the rz_ssi_dma_request() as
> also proposed here:
> https://lore.kernel.org/all/CAMuHMdU+_NuLp2FuwwcLfJRe2ssMtp=z7fqcsANgYfFehTNJGg@mail.gmail.com/
>
Aw crud... Thanks for the review. Cut and pasting the code seems like
probably the right answer. It's not a hard patch to write, but I don't
have the hardware so I can't test it. The existing ordering feels tricky
enough that there is probably a reason for it which I just can't see off
the top of my head...
Let me think about this some more.
regards,
dan carpenter
prev parent reply other threads:[~2025-01-20 10:32 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-01-15 6:55 Dan Carpenter
2025-01-17 11:51 ` Claudiu Beznea
2025-01-20 10:32 ` Dan Carpenter [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=b8a7f1d6-be84-4387-9ef9-b6ec91da69f7@stanley.mountain \
--to=dan.carpenter@linaro.org \
--cc=biju.das.jz@bp.renesas.com \
--cc=broonie@kernel.org \
--cc=claudiu.beznea@tuxon.dev \
--cc=kernel-janitors@vger.kernel.org \
--cc=lgirdwood@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-renesas-soc@vger.kernel.org \
--cc=linux-sound@vger.kernel.org \
--cc=perex@perex.cz \
--cc=prabhakar.mahadev-lad.rj@bp.renesas.com \
--cc=tiwai@suse.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®