Skip to content

Commit 92b0c9c

Browse files
committed
RDMA/core: Convert to use ERR_CAST()
JIRA: https://issues.redhat.com/browse/RHEL-110100 commit 41e2649 Author: Li Haoran <li.haoran7@zte.com.cn> Date: Tue Apr 1 21:08:40 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/20250401210840146_IyrV3zlejzz3eAnDmMSB@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 dbca02d commit 92b0c9c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/infiniband/core/mad_rmpp.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -158,7 +158,7 @@ static struct ib_mad_send_buf *alloc_response_msg(struct ib_mad_agent *agent,
158158
ah = ib_create_ah_from_wc(agent->qp->pd, recv_wc->wc,
159159
recv_wc->recv_buf.grh, agent->port_num);
160160
if (IS_ERR(ah))
161-
return (void *) ah;
161+
return ERR_CAST(ah);
162162

163163
hdr_len = ib_get_mad_data_offset(recv_wc->recv_buf.mad->mad_hdr.mgmt_class);
164164
msg = ib_create_send_mad(agent, recv_wc->wc->src_qp,

0 commit comments

Comments
 (0)