Re: [PATCH] mmc: pxamci: Fix passing NULL to PTR_ERR() in pxamci_probe()

Rakuram Eswaran
2025-10-09T15:27:53Z

Hi Uwe,

Thanks a lot for the review and the clear explanation.

Your suggestion makes perfect sense — since host is devm-managed,
explicitly assigning its members to NULL has no effect.
I’ll remove those two redundant lines in v2 as you suggested.

I had one small clarification regarding the remaining host->dma_chan_tx = NULL;
in the TX DMA error path. Since that branch uses goto out,
the cleanup section below may call dma_release_channel() on both RX
and TX pointers. Setting TX to NULL there seems like a defensive step
to avoid accidentally passing an ERR_PTR() to dma_release_channel()
— is that understanding correct?

Also, I noticed that in the build configuration downloaded from the LKP report
link (CONFIG_DMA_ENGINE isn’t defined), the kernel uses the stub inline
version of dma_release_channel() from include/linux/dmaengine.h,
which becomes a no-op.

From what I understand, when the DMA engine framework isn’t enabled,
these APIs compile as no-ops through their inline stubs.
Please correct me if I’m misunderstanding how this works.

Please let me know if this reasoning aligns with what you had in mind.

Thanks again for the insightful feedback —
I’ll send v2 with those two cleanups shortly.

Best regards,
Rakuram