[igt-dev] [i-g-t 04/20] lib/igt_msm: Use drm_close_driver() to close the drm fd

Bhanuprakash Modem bhanuprakash.modem at intel.com
Tue May 16 16:50:42 UTC 2023


To close the drm file descriptor, use igt helper drm_close_driver()
instead of using close().

cc: Rob Clark <robdclark at chromium.org>
Cc: Abhinav Kumar <quic_abhinavk at quicinc.com>
Signed-off-by: Bhanuprakash Modem <bhanuprakash.modem at intel.com>
---
 lib/igt_msm.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lib/igt_msm.c b/lib/igt_msm.c
index 8c0380f42..a236898b6 100644
--- a/lib/igt_msm.c
+++ b/lib/igt_msm.c
@@ -87,7 +87,7 @@ igt_msm_dev_close(struct msm_device *dev)
 {
 	if (!dev)
 		return;
-	close(dev->fd);
+	drm_close_driver(dev->fd);
 	free(dev);
 }
 
-- 
2.40.0



More information about the igt-dev mailing list