Le 18/09/2026 à 02:18, Rosen Penev a écrit :
platform_get_irq() avoids having to explicitly map and dispose of an irq
by having the platform_device machinery take care of it.

This requires replacing the device_node with a platform_device in the
bcom_eng struct so that platform_get_irq() can use it.

Conveniently, this also allows getting rid of of_node_get and
of_node_put as the platform_device machinery also handles that.

Adjust the goto labels in bcom_task_alloc to match what is being freed.

Signed-off-by: Rosen Penev <[email protected]>
---
  v3: drop stale description
  v2: resend
  drivers/dma/bestcomm/bestcomm.c            | 47 ++++++++--------------
  include/linux/fsl/bestcomm/bestcomm_priv.h |  2 +-
  2 files changed, 18 insertions(+), 31 deletions(-)

diff --git a/drivers/dma/bestcomm/bestcomm.c b/drivers/dma/bestcomm/bestcomm.c
index 241a91936fe8..1006030ff167 100644
--- a/drivers/dma/bestcomm/bestcomm.c
+++ b/drivers/dma/bestcomm/bestcomm.c
@@ -99,17 +102,12 @@ bcom_task_alloc(int bd_count, int bd_size, int priv_size)
return tsk; -error:
-       if (tsk) {
-               if (tsk->irq)
-                       irq_dispose_mapping(tsk->irq);
-               bcom_sram_free(tsk->bd);
-               kfree(tsk->cookie);
-               kfree(tsk);
-       }
-
+err3:
+       kfree(tsk->cookie);
+err2:
+       kfree(tsk);
+err1:
        bcom_eng->tdt[tasknum].stop = 0;
-

This blank line removal is unnecessary.

        return NULL;
  }
  EXPORT_SYMBOL_GPL(bcom_task_alloc);

Reply via email to