[PATCH 2/2] drm/v3d: assure that the job is NULL after being freed

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



After the job is finished and freed, we need to make sure that the job is
NULL. Otherwise, we would get a warning when unloading the driver, as it
would look like the job still exists. Therefore, after freeing the job,
let's assign it to NULL in order to indicate that the job has finished.

Signed-off-by: Maíra Canal <mcanal@xxxxxxxxxx>
---
 drivers/gpu/drm/v3d/v3d_gem.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/gpu/drm/v3d/v3d_gem.c b/drivers/gpu/drm/v3d/v3d_gem.c
index afa7d170d1ff..61a7f36fc8e2 100644
--- a/drivers/gpu/drm/v3d/v3d_gem.c
+++ b/drivers/gpu/drm/v3d/v3d_gem.c
@@ -333,6 +333,7 @@ v3d_job_free(struct kref *ref)
 		v3d_perfmon_put(job->perfmon);

 	kfree(job);
+	job = NULL;
 }

 static void
--
2.41.0




[Index of Archives]     [Linux DRI Users]     [Linux Intel Graphics]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux