drm: "kobject_init/kobject_add" -> "kobject_init_and_add".
Replace sequential calls to kobject_init() and kobject_add() with the combo wrapper kobject_init_and_add(), which provides the same semantics. Signed-off-by: Robert P. J. Day <rpjday@crashcourse.ca> Signed-off-by: Dave Airlie <airlied@redhat.com>
This commit is contained in:
committed by
Dave Airlie
parent
72e942dd84
commit
b642ed06f2
@ -1425,8 +1425,8 @@ int ttm_bo_global_init(struct ttm_global_reference *ref)
|
||||
|
||||
atomic_set(&glob->bo_count, 0);
|
||||
|
||||
kobject_init(&glob->kobj, &ttm_bo_glob_kobj_type);
|
||||
ret = kobject_add(&glob->kobj, ttm_get_kobj(), "buffer_objects");
|
||||
ret = kobject_init_and_add(
|
||||
&glob->kobj, &ttm_bo_glob_kobj_type, ttm_get_kobj(), "buffer_objects");
|
||||
if (unlikely(ret != 0))
|
||||
kobject_put(&glob->kobj);
|
||||
return ret;
|
||||
|
Reference in New Issue
Block a user