From: Pawel Laszczak <pawell@cadence.com>
To: Yang Yingliang <yangyingliang@huawei.com>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
"linux-usb@vger.kernel.org" <linux-usb@vger.kernel.org>
Cc: "gregkh@linuxfoundation.org" <gregkh@linuxfoundation.org>
Subject: RE: [PATCH -next] usb: cdnsp: fix error return code in cdnsp_alloc_priv_device()
Date: Fri, 18 Jun 2021 04:14:34 +0000 [thread overview]
Message-ID: <BYAPR07MB538123BB52A4F6323B9A5633DD0D9@BYAPR07MB5381.namprd07.prod.outlook.com> (raw)
In-Reply-To: <20210617143103.2175477-1-yangyingliang@huawei.com>
>
>If cdnsp_ring_alloc() fails, cdnsp_alloc_priv_device() need return
>error code.
>
>Reported-by: Hulk Robot <hulkci@huawei.com>
>Signed-off-by: Yang Yingliang <yangyingliang@huawei.com>
Acked-by: Pawel Laszczak <pawell@cadence.com>
Thanks.
>---
> drivers/usb/cdns3/cdnsp-mem.c | 4 +++-
> 1 file changed, 3 insertions(+), 1 deletion(-)
>
>diff --git a/drivers/usb/cdns3/cdnsp-mem.c b/drivers/usb/cdns3/cdnsp-mem.c
>index a47948a1623f..c87bf3513844 100644
>--- a/drivers/usb/cdns3/cdnsp-mem.c
>+++ b/drivers/usb/cdns3/cdnsp-mem.c
>@@ -694,8 +694,10 @@ static int cdnsp_alloc_priv_device(struct cdnsp_device *pdev)
>
> /* Allocate endpoint 0 ring. */
> pdev->eps[0].ring = cdnsp_ring_alloc(pdev, 2, TYPE_CTRL, 0, GFP_ATOMIC);
>- if (!pdev->eps[0].ring)
>+ if (!pdev->eps[0].ring) {
>+ ret = -ENOMEM;
> goto fail;
>+ }
>
> /* Point to output device context in dcbaa. */
> pdev->dcbaa->dev_context_ptrs[1] = cpu_to_le64(pdev->out_ctx.dma);
>--
>2.25.1
--
Regards,
Pawel Laszczak
prev parent reply other threads:[~2021-06-18 4:14 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-06-17 14:31 [PATCH -next] usb: cdnsp: fix error return code in cdnsp_alloc_priv_device() Yang Yingliang
2021-06-18 4:14 ` Pawel Laszczak [this message]
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=BYAPR07MB538123BB52A4F6323B9A5633DD0D9@BYAPR07MB5381.namprd07.prod.outlook.com \
--to=pawell@cadence.com \
--cc=gregkh@linuxfoundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-usb@vger.kernel.org \
--cc=yangyingliang@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).