diff options
author | YueHaibing <yuehaibing@huawei.com> | 2018-08-07 07:34:16 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2018-08-07 16:19:45 -0400 |
commit | 5941923da29e84bc9e2a1abb2c14fffaf8d71e2f (patch) | |
tree | b84821e61f4e61444f9158cca824c8d16a1faaa0 | |
parent | 6f705733b7d0d55e854e05d5883b89f19b381a95 (diff) |
RDS: IB: fix 'passing zero to ERR_PTR()' warning
Fix a static code checker warning:
net/rds/ib_frmr.c:82 rds_ib_alloc_frmr() warn: passing zero to 'ERR_PTR'
The error path for ib_alloc_mr failure should set err to PTR_ERR.
Fixes: 1659185fb4d0 ("RDS: IB: Support Fastreg MR (FRMR) memory registration mode")
Signed-off-by: YueHaibing <yuehaibing@huawei.com>
Acked-by: Santosh Shilimkar <santosh.shilimkar@oracle.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
-rw-r--r-- | net/rds/ib_frmr.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/net/rds/ib_frmr.c b/net/rds/ib_frmr.c index d152e48ea371..8596eed6d9a8 100644 --- a/net/rds/ib_frmr.c +++ b/net/rds/ib_frmr.c | |||
@@ -61,6 +61,7 @@ static struct rds_ib_mr *rds_ib_alloc_frmr(struct rds_ib_device *rds_ibdev, | |||
61 | pool->fmr_attr.max_pages); | 61 | pool->fmr_attr.max_pages); |
62 | if (IS_ERR(frmr->mr)) { | 62 | if (IS_ERR(frmr->mr)) { |
63 | pr_warn("RDS/IB: %s failed to allocate MR", __func__); | 63 | pr_warn("RDS/IB: %s failed to allocate MR", __func__); |
64 | err = PTR_ERR(frmr->mr); | ||
64 | goto out_no_cigar; | 65 | goto out_no_cigar; |
65 | } | 66 | } |
66 | 67 | ||