dmaengine.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Re: [PATCH V2] dmaengine: bcm-sba-raid: add missing put_device() call in sba_probe()
@ 2020-07-29 18:00 Markus Elfring
  0 siblings, 0 replies; 3+ messages in thread
From: Markus Elfring @ 2020-07-29 18:00 UTC (permalink / raw)
  To: Yu Kuai, dmaengine
  Cc: linux-kernel, kernel-janitors, Anup Patel, Dan Williams, Ray Jui,
	Vinod Koul, Yi Zhang

> if of_find_device_by_node() succeed, sba_probe() doesn't have a
> corresponding put_device(). …

Wording adjustment:
  If a of_find_device_by_node() call succeeded, sba_probe() did not
  contain a corresponding put_device() call. …

Regards,
Markus

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH V2] dmaengine: bcm-sba-raid: add missing put_device() call in sba_probe()
  2020-07-29 12:49 Yu Kuai
@ 2020-08-17  5:17 ` Vinod Koul
  0 siblings, 0 replies; 3+ messages in thread
From: Vinod Koul @ 2020-08-17  5:17 UTC (permalink / raw)
  To: Yu Kuai
  Cc: dan.j.williams, anup.patel, ray.jui, dmaengine, linux-kernel, yi.zhang

On 29-07-20, 20:49, Yu Kuai wrote:
> if of_find_device_by_node() succeed, sba_probe() doesn't have a
> corresponding put_device(). Thus add a jump target to fix the
> exception handling for this function implementation.

Applied, thanks

-- 
~Vinod

^ permalink raw reply	[flat|nested] 3+ messages in thread

* [PATCH V2] dmaengine: bcm-sba-raid: add missing put_device() call in sba_probe()
@ 2020-07-29 12:49 Yu Kuai
  2020-08-17  5:17 ` Vinod Koul
  0 siblings, 1 reply; 3+ messages in thread
From: Yu Kuai @ 2020-07-29 12:49 UTC (permalink / raw)
  To: dan.j.williams, vkoul, anup.patel, ray.jui
  Cc: dmaengine, linux-kernel, yi.zhang, yukuai3

if of_find_device_by_node() succeed, sba_probe() doesn't have a
corresponding put_device(). Thus add a jump target to fix the
exception handling for this function implementation.

Fixes: 743e1c8ffe4e ("dmaengine: Add Broadcom SBA RAID driver")
Signed-off-by: Yu Kuai <yukuai3@huawei.com>
---
changes from V1:
-forgot to add params in put_device(), sorry about that.

 drivers/dma/bcm-sba-raid.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/drivers/dma/bcm-sba-raid.c b/drivers/dma/bcm-sba-raid.c
index 64239da02e74..322d48b397e7 100644
--- a/drivers/dma/bcm-sba-raid.c
+++ b/drivers/dma/bcm-sba-raid.c
@@ -1707,7 +1707,7 @@ static int sba_probe(struct platform_device *pdev)
 	/* Prealloc channel resource */
 	ret = sba_prealloc_channel_resources(sba);
 	if (ret)
-		goto fail_free_mchan;
+		goto put_device;
 
 	/* Check availability of debugfs */
 	if (!debugfs_initialized())
@@ -1737,6 +1737,8 @@ static int sba_probe(struct platform_device *pdev)
 fail_free_resources:
 	debugfs_remove_recursive(sba->root);
 	sba_freeup_channel_resources(sba);
+put_device:
+	put_device(&mbox_pdev->dev);
 fail_free_mchan:
 	mbox_free_channel(sba->mchan);
 	return ret;
-- 
2.25.4


^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2020-08-17  5:17 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-07-29 18:00 [PATCH V2] dmaengine: bcm-sba-raid: add missing put_device() call in sba_probe() Markus Elfring
  -- strict thread matches above, loose matches on Subject: below --
2020-07-29 12:49 Yu Kuai
2020-08-17  5:17 ` Vinod Koul

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).