From: Logan Gunthorpe <logang@deltatee.com>
To: Yang Li <yang.lee@linux.alibaba.com>, jdmason@kudzu.us
Cc: dave.jiang@intel.com, allenbh@gmail.com,
linux-ntb@googlegroups.com, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2] NTB: Fix an error code in ntb_msit_probe()
Date: Mon, 7 Jun 2021 09:51:29 -0600 [thread overview]
Message-ID: <9182a6e0-541b-e350-d760-06623cb06855@deltatee.com> (raw)
In-Reply-To: <1623045380-125394-1-git-send-email-yang.lee@linux.alibaba.com>
On 2021-06-06 11:56 p.m., Yang Li wrote:
> When the value of nm->isr_ctx is false, the value of ret is 0.
> So, we set ret to -ENOMEM to indicate this error.
>
> Clean up smatch warning:
> drivers/ntb/test/ntb_msi_test.c:373 ntb_msit_probe() warn: missing
> error code 'ret'.
>
> Reported-by: Abaci Robot <abaci@linux.alibaba.com>
> Signed-off-by: Yang Li <yang.lee@linux.alibaba.com>
Thanks!
Reviewed-by: Logan Gunthorpe <logang@deltatee.com>
> ---
>
> Change in v2:
> --revise typo
>
> drivers/ntb/test/ntb_msi_test.c | 4 +++-
> 1 file changed, 3 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/ntb/test/ntb_msi_test.c b/drivers/ntb/test/ntb_msi_test.c
> index 7095ecd..4e18e08 100644
> --- a/drivers/ntb/test/ntb_msi_test.c
> +++ b/drivers/ntb/test/ntb_msi_test.c
> @@ -369,8 +369,10 @@ static int ntb_msit_probe(struct ntb_client *client, struct ntb_dev *ntb)
> if (ret)
> goto remove_dbgfs;
>
> - if (!nm->isr_ctx)
> + if (!nm->isr_ctx) {
> + ret = -ENOMEM;
> goto remove_dbgfs;
> + }
>
> ntb_link_enable(ntb, NTB_SPEED_AUTO, NTB_WIDTH_AUTO);
>
>
prev parent reply other threads:[~2021-06-07 15:51 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-06-07 5:56 [PATCH v2] NTB: Fix an error code in ntb_msit_probe() Yang Li
2021-06-07 15:51 ` Logan Gunthorpe [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=9182a6e0-541b-e350-d760-06623cb06855@deltatee.com \
--to=logang@deltatee.com \
--cc=allenbh@gmail.com \
--cc=dave.jiang@intel.com \
--cc=jdmason@kudzu.us \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-ntb@googlegroups.com \
--cc=yang.lee@linux.alibaba.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).