diff mbox

drm/amdgpu: fix drm-get-put.cocci warnings

Message ID alpine.DEB.2.20.1706071013160.3014@hadrien (mailing list archive)
State New, archived
Headers show

Commit Message

Julia Lawall June 7, 2017, 8:14 a.m. UTC
Use drm_*_get() and drm_*_put() helpers instead of drm_*_reference() and
 drm_*_unreference() helpers.

Generated by: scripts/coccinelle/api/drm-get-put.cocci

CC: Christian König <christian.koenig@amd.com>
Signed-off-by: Julia Lawall <julia.lawall@lip6.fr>
Signed-off-by: Fengguang Wu <fengguang.wu@intel.com>
---

Please take the patch only if it's a positive warning. Thanks!

 amdgpu_prime.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff mbox

Patch

--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_prime.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_prime.c
@@ -173,7 +173,7 @@  amdgpu_gem_prime_foreign_bo(struct amdgp
 			continue;

 		ww_mutex_unlock(&bo->tbo.resv->lock);
-		drm_gem_object_reference(&gobj->base);
+		drm_gem_object_get(&gobj->base);
 		return &gobj->base;
 	}