4f49925d97d4e263f206bc5f2419e47c2b164ad5
[openwrt/staging/blogic.git] /
1 From 7b2fac96ce48939e399707c4b8bd9905d6274a05 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] staging: vc_sm_cma: Remove erroneous misc_deregister
5
6 Code from the misc /dev node was still present in
7 bcm2835_vc_sm_cma_remove, which caused a NULL deref.
8 Remove it.
9
10 See #2885.
11
12 Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.org>
13 ---
14 drivers/staging/vc04_services/vc-sm-cma/vc_sm.c | 5 -----
15 1 file changed, 5 deletions(-)
16
17 --- a/drivers/staging/vc04_services/vc-sm-cma/vc_sm.c
18 +++ b/drivers/staging/vc04_services/vc-sm-cma/vc_sm.c
19 @@ -25,7 +25,6 @@
20 #include <linux/fs.h>
21 #include <linux/kernel.h>
22 #include <linux/list.h>
23 -#include <linux/miscdevice.h>
24 #include <linux/module.h>
25 #include <linux/mm.h>
26 #include <linux/of_device.h>
27 @@ -72,7 +71,6 @@ struct sm_pde_t {
28 struct sm_state_t {
29 struct platform_device *pdev;
30
31 - struct miscdevice dev;
32 struct sm_instance *sm_handle; /* Handle for videocore service. */
33
34 spinlock_t kernelid_map_lock; /* Spinlock protecting kernelid_map */
35 @@ -758,9 +756,6 @@ static int bcm2835_vc_sm_cma_remove(stru
36 {
37 pr_debug("[%s]: start\n", __func__);
38 if (sm_inited) {
39 - /* Remove shared memory device. */
40 - misc_deregister(&sm_state->dev);
41 -
42 /* Remove all proc entries. */
43 //debugfs_remove_recursive(sm_state->dir_root);
44