All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH -next] dmaengine: st_fdma: Fix the error return code in st_fdma_probe()
@ 2016-10-19 13:23 Wei Yongjun
  2016-10-19 15:59 ` [STLinux Kernel] " Peter Griffin
  2016-10-19 17:00 ` Vinod Koul
  0 siblings, 2 replies; 3+ messages in thread
From: Wei Yongjun @ 2016-10-19 13:23 UTC (permalink / raw)
  To: linux-arm-kernel

From: Wei Yongjun <weiyongjun1@huawei.com>

In case of error, the function st_slim_rproc_alloc() returns ERR_PTR()
and never returns NULL. The NULL test in the return value check should
be replaced with IS_ERR().

Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com>
---
 drivers/dma/st_fdma.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/dma/st_fdma.c b/drivers/dma/st_fdma.c
index 515e1d4..a66a57b 100644
--- a/drivers/dma/st_fdma.c
+++ b/drivers/dma/st_fdma.c
@@ -802,7 +802,7 @@ static int st_fdma_probe(struct platform_device *pdev)
 	}
 
 	fdev->slim_rproc = st_slim_rproc_alloc(pdev, fdev->fw_name);
-	if (!fdev->slim_rproc) {
+	if (IS_ERR(fdev->slim_rproc)) {
 		ret = PTR_ERR(fdev->slim_rproc);
 		dev_err(&pdev->dev, "slim_rproc_alloc failed (%d)\n", ret);
 		goto err;

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

* [STLinux Kernel] [PATCH -next] dmaengine: st_fdma: Fix the error return code in st_fdma_probe()
  2016-10-19 13:23 [PATCH -next] dmaengine: st_fdma: Fix the error return code in st_fdma_probe() Wei Yongjun
@ 2016-10-19 15:59 ` Peter Griffin
  2016-10-19 17:00 ` Vinod Koul
  1 sibling, 0 replies; 3+ messages in thread
From: Peter Griffin @ 2016-10-19 15:59 UTC (permalink / raw)
  To: linux-arm-kernel

Hi Wei,

On Wed, 19 Oct 2016, Wei Yongjun wrote:

> From: Wei Yongjun <weiyongjun1@huawei.com>
> 
> In case of error, the function st_slim_rproc_alloc() returns ERR_PTR()
> and never returns NULL. The NULL test in the return value check should
> be replaced with IS_ERR().
> 
> Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com>
> ---

Good spot.

Acked-by: Peter Griffin <peter.griffin@linaro.org>

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

* [PATCH -next] dmaengine: st_fdma: Fix the error return code in st_fdma_probe()
  2016-10-19 13:23 [PATCH -next] dmaengine: st_fdma: Fix the error return code in st_fdma_probe() Wei Yongjun
  2016-10-19 15:59 ` [STLinux Kernel] " Peter Griffin
@ 2016-10-19 17:00 ` Vinod Koul
  1 sibling, 0 replies; 3+ messages in thread
From: Vinod Koul @ 2016-10-19 17:00 UTC (permalink / raw)
  To: linux-arm-kernel

On Wed, Oct 19, 2016 at 01:23:50PM +0000, Wei Yongjun wrote:
> From: Wei Yongjun <weiyongjun1@huawei.com>
> 
> In case of error, the function st_slim_rproc_alloc() returns ERR_PTR()
> and never returns NULL. The NULL test in the return value check should
> be replaced with IS_ERR().
> 

Applied, thanks

-- 
~Vinod

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

end of thread, other threads:[~2016-10-19 17:00 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-10-19 13:23 [PATCH -next] dmaengine: st_fdma: Fix the error return code in st_fdma_probe() Wei Yongjun
2016-10-19 15:59 ` [STLinux Kernel] " Peter Griffin
2016-10-19 17:00 ` Vinod Koul

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.