From: Oleksij Rempel <o.rempel@pengutronix.de>
To: Wei Yongjun <weiyongjun1@huawei.com>,
Jay Cliburn <jcliburn@gmail.com>,
Chris Snook <chris.snook@gmail.com>
Cc: netdev@vger.kernel.org, kernel-janitors@vger.kernel.org
Subject: Re: [PATCH] net: ethernet: fix error return code in ag71xx_probe()
Date: Thu, 18 Jul 2019 09:41:13 +0200 [thread overview]
Message-ID: <ec4fb148-7260-a89d-eaa2-b5bb7c01c530@pengutronix.de> (raw)
In-Reply-To: <20190717115215.22965-1-weiyongjun1@huawei.com>
On 17.07.19 13:52, Wei Yongjun wrote:
> Fix to return error code -ENOMEM from the dmam_alloc_coherent() error
> handling case instead of 0, as done elsewhere in this function.
>
> Fixes: d51b6ce441d3 ("net: ethernet: add ag71xx driver")
> Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com>
Reviewed-by: Oleksij Rempel <o.rempel@pengutronix.de>
> ---
> drivers/net/ethernet/atheros/ag71xx.c | 4 +++-
> 1 file changed, 3 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/net/ethernet/atheros/ag71xx.c b/drivers/net/ethernet/atheros/ag71xx.c
> index 72a57c6cd254..446d62e93439 100644
> --- a/drivers/net/ethernet/atheros/ag71xx.c
> +++ b/drivers/net/ethernet/atheros/ag71xx.c
> @@ -1724,8 +1724,10 @@ static int ag71xx_probe(struct platform_device *pdev)
> ag->stop_desc = dmam_alloc_coherent(&pdev->dev,
> sizeof(struct ag71xx_desc),
> &ag->stop_desc_dma, GFP_KERNEL);
> - if (!ag->stop_desc)
> + if (!ag->stop_desc) {
> + err = -ENOMEM;
> goto err_free;
> + }
>
> ag->stop_desc->data = 0;
> ag->stop_desc->ctrl = 0;
>
>
>
>
Kind regards,
Oleksij Rempel
--
Pengutronix e.K. | |
Industrial Linux Solutions | http://www.pengutronix.de/ |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 |
Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |
next prev parent reply other threads:[~2019-07-18 7:41 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-07-17 11:52 [PATCH] net: ethernet: fix error return code in ag71xx_probe() Wei Yongjun
2019-07-18 7:41 ` Oleksij Rempel [this message]
2019-07-19 1:21 ` [PATCH v2] ag71xx: " Wei Yongjun
2019-07-19 3:34 ` David Miller
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=ec4fb148-7260-a89d-eaa2-b5bb7c01c530@pengutronix.de \
--to=o.rempel@pengutronix.de \
--cc=chris.snook@gmail.com \
--cc=jcliburn@gmail.com \
--cc=kernel-janitors@vger.kernel.org \
--cc=netdev@vger.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