Skip to content

Commit 6dc4395

Browse files
committed
staging: vc-sm-cma: Ensure mutex and idr are destroyed
map_lock and kernelid_map are created in probe, but not released in release should the vcsm service not connect (eg running the cutdown firmware). Signed-off-by: Dave Stevenson <[email protected]>
1 parent b2fc31f commit 6dc4395

File tree

1 file changed

+4
-4
lines changed
  • drivers/staging/vc04_services/vc-sm-cma

1 file changed

+4
-4
lines changed

drivers/staging/vc04_services/vc-sm-cma/vc_sm.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -752,12 +752,12 @@ static int bcm2835_vc_sm_cma_remove(struct platform_device *pdev)
752752

753753
/* Stop the videocore shared memory service. */
754754
vc_sm_cma_vchi_stop(&sm_state->sm_handle);
755+
}
755756

756-
idr_destroy(&sm_state->kernelid_map);
757+
idr_destroy(&sm_state->kernelid_map);
757758

758-
/* Free the memory for the state structure. */
759-
mutex_destroy(&sm_state->map_lock);
760-
}
759+
/* Free the memory for the state structure. */
760+
mutex_destroy(&sm_state->map_lock);
761761

762762
pr_debug("[%s]: end\n", __func__);
763763
return 0;

0 commit comments

Comments
 (0)