1 From 5e4bc7e0e9ea34cabc14c6028fe2eaf7b8295999 Mon Sep 17 00:00:00 2001
2 From: Dave Stevenson <dave.stevenson@raspberrypi.org>
3 Date: Fri, 8 Mar 2019 10:38:59 +0000
4 Subject: [PATCH 368/773] staging: vc_sm_cma: Remove erroneous misc_deregister
6 Code from the misc /dev node was still present in
7 bcm2835_vc_sm_cma_remove, which caused a NULL deref.
12 Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.org>
14 drivers/staging/vc04_services/vc-sm-cma/vc_sm.c | 5 -----
15 1 file changed, 5 deletions(-)
17 --- a/drivers/staging/vc04_services/vc-sm-cma/vc_sm.c
18 +++ b/drivers/staging/vc04_services/vc-sm-cma/vc_sm.c
21 #include <linux/kernel.h>
22 #include <linux/list.h>
23 -#include <linux/miscdevice.h>
24 #include <linux/module.h>
26 #include <linux/of_device.h>
27 @@ -72,7 +71,6 @@ struct sm_pde_t {
29 struct platform_device *pdev;
31 - struct miscdevice dev;
32 struct sm_instance *sm_handle; /* Handle for videocore service. */
34 spinlock_t kernelid_map_lock; /* Spinlock protecting kernelid_map */
35 @@ -758,9 +756,6 @@ static int bcm2835_vc_sm_cma_remove(stru
37 pr_debug("[%s]: start\n", __func__);
39 - /* Remove shared memory device. */
40 - misc_deregister(&sm_state->dev);
42 /* Remove all proc entries. */
43 //debugfs_remove_recursive(sm_state->dir_root);