Re: [PATCH] ASoC: renesas: rz-ssi: Clean up on error in probe()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxxxxxx/
> 

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




[Index of Archives]     [Kernel Development]     [Kernel Announce]     [Kernel Newbies]     [Linux Networking Development]     [Share Photos]     [IDE]     [Security]     [Git]     [Netfilter]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Device Mapper]

  Powered by Linux