Skip to content

Commit

Permalink
staging: vc_sm_cma: Remove erroneous misc_deregister
Browse files Browse the repository at this point in the history
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 <dave.stevenson@raspberrypi.org>
  • Loading branch information
6by9 authored and popcornmix committed Mar 15, 2019
1 parent 707de56 commit 3667ae0
Showing 1 changed file with 0 additions and 5 deletions.
5 changes: 0 additions & 5 deletions drivers/staging/vc04_services/vc-sm-cma/vc_sm.c
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@
#include <linux/fs.h>
#include <linux/kernel.h>
#include <linux/list.h>
#include <linux/miscdevice.h>
#include <linux/module.h>
#include <linux/mm.h>
#include <linux/of_device.h>
Expand Down Expand Up @@ -72,7 +71,6 @@ struct sm_pde_t {
struct sm_state_t {
struct platform_device *pdev;

struct miscdevice dev;
struct sm_instance *sm_handle; /* Handle for videocore service. */

spinlock_t kernelid_map_lock; /* Spinlock protecting kernelid_map */
Expand Down Expand Up @@ -758,9 +756,6 @@ static int bcm2835_vc_sm_cma_remove(struct platform_device *pdev)
{
pr_debug("[%s]: start\n", __func__);
if (sm_inited) {
/* Remove shared memory device. */
misc_deregister(&sm_state->dev);

/* Remove all proc entries. */
//debugfs_remove_recursive(sm_state->dir_root);

Expand Down

0 comments on commit 3667ae0

Please sign in to comment.