From: Hans de Goede Date: Tue, 11 Sep 2018 07:15:44 +0000 (+0200) Subject: staging: vboxvideo: Drop vbox_bo_unref() helper X-Git-Tag: v5.4-rc1~2324^2~360 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=4f6f44086fce7f4d558f762b53c8dcabe5763937;p=platform%2Fkernel%2Flinux-rpi.git staging: vboxvideo: Drop vbox_bo_unref() helper Drop the unnecessary vbox_bo_unref() helper and directly call ttm_bo_put() at the single call site. Signed-off-by: Hans de Goede Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/staging/vboxvideo/vbox_main.c b/drivers/staging/vboxvideo/vbox_main.c index b6cff31..783a68c 100644 --- a/drivers/staging/vboxvideo/vbox_main.c +++ b/drivers/staging/vboxvideo/vbox_main.c @@ -482,23 +482,11 @@ int vbox_dumb_create(struct drm_file *file, return 0; } -static void vbox_bo_unref(struct vbox_bo **bo) -{ - struct ttm_buffer_object *tbo; - - if ((*bo) == NULL) - return; - - tbo = &((*bo)->bo); - ttm_bo_put(tbo); - *bo = NULL; -} - void vbox_gem_free_object(struct drm_gem_object *obj) { struct vbox_bo *vbox_bo = gem_to_vbox_bo(obj); - vbox_bo_unref(&vbox_bo); + ttm_bo_put(&vbox_bo->bo); } static inline u64 vbox_bo_mmap_offset(struct vbox_bo *bo)