Re: [PATCH] dmaengine: qcom_hidma: Simplify error handling path in hidma_probe

2020-04-28 Thread Sinan Kaya
On 4/28/2020 1:21 PM, Dan Carpenter wrote: > What I meant to say here was: > > if (msi) { > rc = hidma_request_msi(dmadev, pdev); > if (rc) > msi = false; > > Otherwise we end up checking freeing the msi in the error handling > code when we

Re: [PATCH] dmaengine: qcom_hidma: Simplify error handling path in hidma_probe

2020-04-28 Thread Dan Carpenter
I apologize, I wrote my code hurriedly and did no explain the bug well. I understood what the code is doing, but my fix was missing an if condition. On Tue, Apr 28, 2020 at 12:01:15PM -0400, Sinan Kaya wrote: > On 4/28/2020 8:54 AM, Dan Carpenter wrote: > >> @@ -897,7 +897,6 @@ static int hidma_pr

Re: [PATCH] dmaengine: qcom_hidma: Simplify error handling path in hidma_probe

2020-04-28 Thread Sinan Kaya
On 4/28/2020 8:54 AM, Dan Carpenter wrote: >> @@ -897,7 +897,6 @@ static int hidma_probe(struct platform_device *pdev) >> if (msi) > ^^^ > This test doesn't work. It will call free hidma_free_msis() if the > hidma_request_msi() call fails. We should do: > > if (msi) { >

Re: [PATCH] dmaengine: qcom_hidma: Simplify error handling path in hidma_probe

2020-04-28 Thread Dan Carpenter
On Mon, Apr 27, 2020 at 01:10:43PM +0200, Christophe JAILLET wrote: > There is no need to call 'hidma_debug_uninit()' in the error handling > path. 'hidma_debug_init()' has not been called yet. > > Signed-off-by: Christophe JAILLET > --- > drivers/dma/qcom/hidma.c | 1 - > 1 file changed, 1 dele