diff options
author | Maxime Ripard <maxime@cerno.tech> | 2022-07-11 19:39:35 +0200 |
---|---|---|
committer | Maxime Ripard <maxime@cerno.tech> | 2022-07-13 10:46:13 +0200 |
commit | 374146cad469102b683939009f18fa88f9b9b6c9 (patch) | |
tree | acf8c3cdc732853d2ce05413a9a7a897bfaf602b /drivers/gpu/drm/vc4/vc4_drv.c | |
parent | drm/vc4: debugfs: Simplify debugfs registration (diff) | |
download | linux-374146cad469102b683939009f18fa88f9b9b6c9.tar.xz linux-374146cad469102b683939009f18fa88f9b9b6c9.zip |
drm/vc4: Switch to drmm_mutex_init
mutex_init is supposed to be balanced by a call to mutex_destroy that we
were never doing in the vc4 driver.
Since a DRM-managed mutex_init variant has been introduced, let's just
switch to it.
Acked-by: Thomas Zimmermann <tzimmermann@suse.de>
Signed-off-by: Maxime Ripard <maxime@cerno.tech>
Link: https://lore.kernel.org/r/20220711173939.1132294-66-maxime@cerno.tech
Diffstat (limited to 'drivers/gpu/drm/vc4/vc4_drv.c')
-rw-r--r-- | drivers/gpu/drm/vc4/vc4_drv.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/gpu/drm/vc4/vc4_drv.c b/drivers/gpu/drm/vc4/vc4_drv.c index 79a37d18aeb1..89975bdd607e 100644 --- a/drivers/gpu/drm/vc4/vc4_drv.c +++ b/drivers/gpu/drm/vc4/vc4_drv.c @@ -324,7 +324,9 @@ static int vc4_drm_bind(struct device *dev) INIT_LIST_HEAD(&vc4->debugfs_list); if (!is_vc5) { - mutex_init(&vc4->bin_bo_lock); + ret = drmm_mutex_init(drm, &vc4->bin_bo_lock); + if (ret) + return ret; ret = vc4_bo_cache_init(drm); if (ret) |