Skip to content

Commit dbca02d

Browse files
committed
RDMA/uverbs: Convert to use ERR_CAST()
JIRA: https://issues.redhat.com/browse/RHEL-110100 commit 7bc871a Author: Li Haoran <li.haoran7@zte.com.cn> Date: Tue Apr 1 21:09:23 2025 +0800 RDMA/uverbs: 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/202504012109233981_YPVbd4wQzmAzP3tA5IG@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 8bdce89 commit dbca02d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/infiniband/core/uverbs_cmd.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -193,7 +193,7 @@ _ib_uverbs_lookup_comp_file(s32 fd, struct uverbs_attr_bundle *attrs)
193193
fd, attrs);
194194

195195
if (IS_ERR(uobj))
196-
return (void *)uobj;
196+
return ERR_CAST(uobj);
197197

198198
uverbs_uobject_get(uobj);
199199
uobj_put_read(uobj);

0 commit comments

Comments
 (0)