Skip to content

Commit 8bdce89

Browse files
committed
RDMA/core: Convert to use ERR_CAST()
JIRA: https://issues.redhat.com/browse/RHEL-110100 commit 8a94c42 Author: Li Haoran <li.haoran7@zte.com.cn> Date: Tue Apr 1 21:10:15 2025 +0800 RDMA/core: Convert to use ERR_CAST() As opposed to open-code, using the ERR_CAST macro clearly indicates that this is a pointer to an error value and a type conversion was performed. Link: https://patch.msgid.link/r/20250401211015750qxOfU9XZ8QgKizM1Lcyq2@zte.com.cn Signed-off-by: Li Haoran <li.haoran7@zte.com.cn> Signed-off-by: Shao Mingyin <shao.mingyin@zte.com.cn> Signed-off-by: Jason Gunthorpe <jgg@nvidia.com> Signed-off-by: Kamal Heib <kheib@redhat.com>
1 parent 03468d4 commit 8bdce89

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/infiniband/core/verbs.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -572,7 +572,7 @@ struct ib_ah *rdma_create_ah(struct ib_pd *pd, struct rdma_ah_attr *ah_attr,
572572
GFP_KERNEL : GFP_ATOMIC);
573573
if (IS_ERR(slave)) {
574574
rdma_unfill_sgid_attr(ah_attr, old_sgid_attr);
575-
return (void *)slave;
575+
return ERR_CAST(slave);
576576
}
577577
ah = _rdma_create_ah(pd, ah_attr, flags, NULL, slave);
578578
rdma_lag_put_ah_roce_slave(slave);

0 commit comments

Comments
 (0)