mirror of
https://github.com/torvalds/linux.git
synced 2024-11-25 13:41:51 +00:00
net/smc: Fix an error code in smc_lgr_create()
If smc_wr_alloc_lgr_mem() fails then return an error code. Don't return
success.
Fixes: 8799e310fb
("net/smc: add v2 support to the work request layer")
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Reviewed-by: Wenjia Zhang <wenjia@linux.ibm.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
0c9efbd5c5
commit
bdee15e8c5
@ -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);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user