Skip to content

Commit 089ae6d

Browse files
6by9pelwell
authored andcommitted
staging: vc_sm_cma: Remove erroneous misc_deregister
Code from the misc /dev node was still present in bcm2835_vc_sm_cma_remove, which caused a NULL deref. Remove it. See #2885. Signed-off-by: Dave Stevenson <[email protected]>
1 parent c0e09b3 commit 089ae6d

File tree

1 file changed

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

1 file changed

+0
-5
lines changed

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

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,6 @@
2525
#include <linux/fs.h>
2626
#include <linux/kernel.h>
2727
#include <linux/list.h>
28-
#include <linux/miscdevice.h>
2928
#include <linux/module.h>
3029
#include <linux/mm.h>
3130
#include <linux/of_device.h>
@@ -72,7 +71,6 @@ struct sm_pde_t {
7271
struct sm_state_t {
7372
struct platform_device *pdev;
7473

75-
struct miscdevice dev;
7674
struct sm_instance *sm_handle; /* Handle for videocore service. */
7775

7876
spinlock_t kernelid_map_lock; /* Spinlock protecting kernelid_map */
@@ -758,9 +756,6 @@ static int bcm2835_vc_sm_cma_remove(struct platform_device *pdev)
758756
{
759757
pr_debug("[%s]: start\n", __func__);
760758
if (sm_inited) {
761-
/* Remove shared memory device. */
762-
misc_deregister(&sm_state->dev);
763-
764759
/* Remove all proc entries. */
765760
//debugfs_remove_recursive(sm_state->dir_root);
766761

0 commit comments

Comments
 (0)