lkml.org 
[lkml]   [2025]   [Jan]   [20]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] ASoC: renesas: rz-ssi: Clean up on error in probe()
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

\
 
 \ /
  Last update: 2025-01-20 11:33    [from the cache]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and my Meterkast|Read the blog