From: Angelo Dureghello <angelo@sysam.it>
To: Wei Yongjun <weiyongjun1@huawei.com>
Cc: Vinod Koul <vkoul@kernel.org>,
Dan Williams <dan.j.williams@intel.com>,
dmaengine@vger.kernel.org, kernel-janitors@vger.kernel.org
Subject: [-next] dmaengine: fsl-edma: fix the error return code in mcf_edma_probe()
Date: Wed, 4 Jul 2018 11:04:46 +0200 [thread overview]
Message-ID: <20180704090445.GD9939@jerusalem> (raw)
Reviewed-by: Angelo Dureghello <angelo@sysam.it>
Thanks for the fix.
On Wed, Jul 04, 2018 at 08:21:51AM +0000, Wei Yongjun wrote:
> The error return code PTR_ERR(pdata) is always 0 since pdata is
> NULL in this error handling case.
>
> Fixes: 5c1355ad87a2 ("dmaengine: fsl-edma: add ColdFire mcf5441x edma support")
> Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com>
> ---
> drivers/dma/mcf-edma.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/dma/mcf-edma.c b/drivers/dma/mcf-edma.c
> index 31e5317..787b7b6 100644
> --- a/drivers/dma/mcf-edma.c
> +++ b/drivers/dma/mcf-edma.c
> @@ -175,7 +175,7 @@ static int mcf_edma_probe(struct platform_device *pdev)
>
> pdata = dev_get_platdata(&pdev->dev);
> if (!pdata)
> - return PTR_ERR(pdata);
> + return -EINVAL;
>
> chans = pdata->dma_channels;
> len = sizeof(*mcf_edma) + sizeof(*mcf_chan) * chans;
>
> --
> To unsubscribe from this list: send the line "unsubscribe dmaengine" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
---
To unsubscribe from this list: send the line "unsubscribe dmaengine" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
next reply other threads:[~2018-07-04 9:04 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-07-04 9:04 Angelo Dureghello [this message]
-- strict thread matches above, loose matches on Subject: below --
2018-07-04 8:21 [-next] dmaengine: fsl-edma: fix the error return code in mcf_edma_probe() weiyongjun (A)
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=20180704090445.GD9939@jerusalem \
--to=angelo@sysam.it \
--cc=dan.j.williams@intel.com \
--cc=dmaengine@vger.kernel.org \
--cc=kernel-janitors@vger.kernel.org \
--cc=vkoul@kernel.org \
--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).