RDS: IB: fix 'passing zero to ERR_PTR()' warning
authorYueHaibing <yuehaibing@huawei.com>
Tue, 7 Aug 2018 11:34:16 +0000 (19:34 +0800)
committerDavid S. Miller <davem@davemloft.net>
Tue, 7 Aug 2018 20:19:45 +0000 (13:19 -0700)
commit5941923da29e84bc9e2a1abb2c14fffaf8d71e2f
treeb84821e61f4e61444f9158cca824c8d16a1faaa0
parent6f705733b7d0d55e854e05d5883b89f19b381a95
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>
net/rds/ib_frmr.c