Staging: mrst-touchscreen: fix dereferencing free memory
I moved the kfree() down a couple lines after the dereference. Signed-off-by: Dan Carpenter <error27@gmail.com> Acked-by: Alan Cox <alan@linux.intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
This commit is contained in:
parent
eb169d1cc7
commit
44176d9f82
@ -817,9 +817,9 @@ static int mrstouch_remove(struct spi_device *spi)
|
|||||||
free_irq(mrstouchdevp->irq, mrstouchdevp);
|
free_irq(mrstouchdevp->irq, mrstouchdevp);
|
||||||
input_unregister_device(mrstouchdevp->input);
|
input_unregister_device(mrstouchdevp->input);
|
||||||
input_free_device(mrstouchdevp->input);
|
input_free_device(mrstouchdevp->input);
|
||||||
kfree(mrstouchdevp);
|
|
||||||
if (mrstouchdevp->pendet_thrd)
|
if (mrstouchdevp->pendet_thrd)
|
||||||
kthread_stop(mrstouchdevp->pendet_thrd);
|
kthread_stop(mrstouchdevp->pendet_thrd);
|
||||||
|
kfree(mrstouchdevp);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user