From: Wenjia Zhang <wenjia@linux.ibm.com>
To: Dan Carpenter <dan.carpenter@oracle.com>,
Karsten Graul <kgraul@linux.ibm.com>
Cc: Jan Karcher <jaka@linux.ibm.com>,
"David S. Miller" <davem@davemloft.net>,
Eric Dumazet <edumazet@google.com>,
Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>,
linux-s390@vger.kernel.org, netdev@vger.kernel.org,
kernel-janitors@vger.kernel.org
Subject: Re: [PATCH net] net/smc: Fix an error code in smc_lgr_create()
Date: Fri, 14 Oct 2022 13:34:17 +0200 [thread overview]
Message-ID: <28880e7d-c02b-0b34-d1f3-54596ec7f297@linux.ibm.com> (raw)
In-Reply-To: <Y0ktLDGg0CafxS3d@kili>
On 14.10.22 11:34, Dan Carpenter wrote:
> If smc_wr_alloc_lgr_mem() fails then return an error code. Don't return
> success.
>
> Fixes: 8799e310fb3f ("net/smc: add v2 support to the work request layer")
> Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
> ---
> net/smc/smc_core.c | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/net/smc/smc_core.c b/net/smc/smc_core.c
> index e6ee797640b4..c305d8dd23f8 100644
> --- a/net/smc/smc_core.c
> +++ b/net/smc/smc_core.c
> @@ -896,7 +896,8 @@ static int smc_lgr_create(struct smc_sock *smc, struct smc_init_info *ini)
> }
> memcpy(lgr->pnet_id, ibdev->pnetid[ibport - 1],
> SMC_MAX_PNETID_LEN);
> - if (smc_wr_alloc_lgr_mem(lgr))
> + rc = smc_wr_alloc_lgr_mem(lgr);
> + if (rc)
> goto free_wq;
> smc_llc_lgr_init(lgr, smc);
>
Good catch! Thank you for your effort!
Reviewed-by: Wenjia Zhang <wenjia@linux.ibm.com>
next prev parent reply other threads:[~2022-10-14 11:34 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-10-14 9:34 [PATCH net] net/smc: Fix an error code in smc_lgr_create() Dan Carpenter
2022-10-14 11:34 ` Wenjia Zhang [this message]
2022-10-15 10:20 ` patchwork-bot+netdevbpf
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=28880e7d-c02b-0b34-d1f3-54596ec7f297@linux.ibm.com \
--to=wenjia@linux.ibm.com \
--cc=dan.carpenter@oracle.com \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=jaka@linux.ibm.com \
--cc=kernel-janitors@vger.kernel.org \
--cc=kgraul@linux.ibm.com \
--cc=kuba@kernel.org \
--cc=linux-s390@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.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