linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Peter Griffin <peter.griffin@linaro.org>
To: linux-arm-kernel@lists.infradead.org,
	linux-kernel@vger.kernel.org, kernel@stlinux.com,
	bjorn.andersson@linaro.org, vinod.koul@intel.com,
	ohad@wizery.com
Cc: peter.griffin@linaro.org, lee.jones@linaro.org,
	dmaengine@vger.kernel.org, remoteproc@vger.kernel.org,
	Wei Yongjun <weiyongjun1@huawei.com>
Subject: [PATCH v11 13/14] dmaengine: st_fdma: Fix the error return code in st_fdma_probe()
Date: Mon,  7 Nov 2016 18:17:44 +0000	[thread overview]
Message-ID: <1478542665-17089-14-git-send-email-peter.griffin@linaro.org> (raw)
In-Reply-To: <1478542665-17089-1-git-send-email-peter.griffin@linaro.org>

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>
Acked-by: Peter Griffin <peter.griffin@linaro.org>
---
 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 232d354..bfb79bd 100644
--- a/drivers/dma/st_fdma.c
+++ b/drivers/dma/st_fdma.c
@@ -792,7 +792,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;
-- 
2.7.4

  parent reply	other threads:[~2016-11-07 18:19 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-11-07 18:17 [PATCH v11 00/14] Add support for FDMA DMA controller and slim core rproc found on STi chipsets Peter Griffin
2016-11-07 18:17 ` [PATCH v11 01/14] remoteproc: Update Kconfig setup to 'depends on REMOTEPROC' Peter Griffin
2016-11-07 18:17 ` [PATCH v11 02/14] remoteproc: st_slim_rproc: add a slimcore rproc driver Peter Griffin
2016-11-07 18:17 ` [PATCH v11 03/14] MAINTAINERS: Add st slim core rproc driver to STi section Peter Griffin
2016-11-07 18:17 ` [PATCH v11 04/14] dmaengine: st_fdma: Add STMicroelectronics FDMA DT binding documentation Peter Griffin
2016-11-07 18:17 ` [PATCH v11 05/14] dmaengine: st_fdma: Add STMicroelectronics FDMA driver header file Peter Griffin
2016-11-07 18:17 ` [PATCH v11 06/14] dmaengine: st_fdma: Add STMicroelectronics FDMA engine driver support Peter Griffin
2016-11-07 18:17 ` [PATCH v11 07/14] MAINTAINERS: Add FDMA driver files to STi section Peter Griffin
2016-11-07 18:17 ` [PATCH v11 08/14] ARM: multi_v7_defconfig: Enable remoteproc core Peter Griffin
2016-11-07 18:17 ` [PATCH v11 09/14] ARM: multi_v7_defconfig: Enable st_remoteproc driver Peter Griffin
2016-11-07 18:17 ` [PATCH v11 10/14] ARM: multi_v7_defconfig: Enable STi FDMA driver Peter Griffin
2016-11-07 18:17 ` [PATCH v11 11/14] ARM: multi_v7_defconfig: Enable STi and simple-card drivers Peter Griffin
2016-11-07 18:17 ` [PATCH v11 12/14] dmaengine: st_fdma: fix uninitialized variable access Peter Griffin
2016-11-07 18:17 ` Peter Griffin [this message]
2016-11-07 18:17 ` [PATCH v11 14/14] dmaengine: st_fdma: Update st_fdma to 'depends on REMOTEPROC' Peter Griffin
2016-11-14  5:19 ` [PATCH v11 00/14] Add support for FDMA DMA controller and slim core rproc found on STi chipsets Vinod Koul

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1478542665-17089-14-git-send-email-peter.griffin@linaro.org \
    --to=peter.griffin@linaro.org \
    --cc=bjorn.andersson@linaro.org \
    --cc=dmaengine@vger.kernel.org \
    --cc=kernel@stlinux.com \
    --cc=lee.jones@linaro.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=ohad@wizery.com \
    --cc=remoteproc@vger.kernel.org \
    --cc=vinod.koul@intel.com \
    --cc=weiyongjun1@huawei.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).