diff options
| -rw-r--r-- | include/rdma/uverbs_ioctl.h | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/include/rdma/uverbs_ioctl.h b/include/rdma/uverbs_ioctl.h index 4a4201d997a7..095383a4bd1a 100644 --- a/include/rdma/uverbs_ioctl.h +++ b/include/rdma/uverbs_ioctl.h | |||
| @@ -411,13 +411,13 @@ static inline int uverbs_attr_get_enum_id(const struct uverbs_attr_bundle *attrs | |||
| 411 | static inline void *uverbs_attr_get_obj(const struct uverbs_attr_bundle *attrs_bundle, | 411 | static inline void *uverbs_attr_get_obj(const struct uverbs_attr_bundle *attrs_bundle, |
| 412 | u16 idx) | 412 | u16 idx) |
| 413 | { | 413 | { |
| 414 | struct ib_uobject *uobj = | 414 | const struct uverbs_attr *attr; |
| 415 | uverbs_attr_get(attrs_bundle, idx)->obj_attr.uobject; | ||
| 416 | 415 | ||
| 417 | if (IS_ERR(uobj)) | 416 | attr = uverbs_attr_get(attrs_bundle, idx); |
| 418 | return uobj; | 417 | if (IS_ERR(attr)) |
| 418 | return ERR_CAST(attr); | ||
| 419 | 419 | ||
| 420 | return uobj->object; | 420 | return attr->obj_attr.uobject->object; |
| 421 | } | 421 | } |
| 422 | 422 | ||
| 423 | static inline int uverbs_copy_to(const struct uverbs_attr_bundle *attrs_bundle, | 423 | static inline int uverbs_copy_to(const struct uverbs_attr_bundle *attrs_bundle, |
