diff options
author | Dan Carpenter <error27@gmail.com> | 2010-06-05 13:16:42 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2010-06-30 11:18:14 -0400 |
commit | 44176d9f8265de799512f833ca4d9785aa016b3a (patch) | |
tree | 27a9f4c4ae81529e8cf2b1090dfca2d17e11869f /drivers | |
parent | eb169d1cc7fb219cc42c584f7a195f71913e6b6a (diff) |
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>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/staging/mrst-touchscreen/intel-mid-touch.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/staging/mrst-touchscreen/intel-mid-touch.c b/drivers/staging/mrst-touchscreen/intel-mid-touch.c index 1db00975a594..abba22f921be 100644 --- a/drivers/staging/mrst-touchscreen/intel-mid-touch.c +++ b/drivers/staging/mrst-touchscreen/intel-mid-touch.c | |||
@@ -817,9 +817,9 @@ static int mrstouch_remove(struct spi_device *spi) | |||
817 | free_irq(mrstouchdevp->irq, mrstouchdevp); | 817 | free_irq(mrstouchdevp->irq, mrstouchdevp); |
818 | input_unregister_device(mrstouchdevp->input); | 818 | input_unregister_device(mrstouchdevp->input); |
819 | input_free_device(mrstouchdevp->input); | 819 | input_free_device(mrstouchdevp->input); |
820 | kfree(mrstouchdevp); | ||
821 | if (mrstouchdevp->pendet_thrd) | 820 | if (mrstouchdevp->pendet_thrd) |
822 | kthread_stop(mrstouchdevp->pendet_thrd); | 821 | kthread_stop(mrstouchdevp->pendet_thrd); |
822 | kfree(mrstouchdevp); | ||
823 | return 0; | 823 | return 0; |
824 | } | 824 | } |
825 | 825 | ||