Skip to content

dmaengine: fsl_raid: fix resource leaks and simplify drvdata handling

Rosen Penev dmaengine lkml 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v2 Latest2 patches 4 repliesIn review

Patches in v2 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/2dmaengine: fsl_raid: pass platform_device to drvdatadrivers/dma/fsl_raid.c+7 -81 reply
2/2dmaengine: fsl_raid: free resources in probedrivers/dma/fsl_raid.c drivers/dma/fsl_raid.h+15 -63 replies

Reviews trailers per patch

1 of 2 patches has a Reviewed-by or Acked-by.

PatchFrank Li
1/2R-b
2/2

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v2 thread

Cover letter [PATCHv2 0/2] dmaengine: fsl_raid: fix resource leaks and simplify drvdata handling

This series fixes resource leaks in the FSL RAIDEngine driver and simplifies drvdata handling:

1) Replace dev_get_drvdata/dev_set_drvdata with platform_get_drvdata/ platform_set_drvdata, since a platform_device is always used. This avoids taking a pointer to a platform device member.

2) Add missing free_irq() in error unwind of fsl_re_chan_probe() and in fsl_re_remove_chan(). Also add tasklet_kill() and of_platform_device_destroy() to properly release all resources.

v2: split into two patches

Rosen Penev (2):
dmaengine: fsl_raid: pass platform_device to drvdata
dmaengine: fsl_raid: free resources in probe

 drivers/dma/fsl_raid.c | 33 ++++++++++++++++++++-------------
 drivers/dma/fsl_raid.h |  1 +
 2 files changed, 21 insertions(+), 13 deletions(-)
Signature · 1 line
2.55.0