Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 44176d9f authored by Dan Carpenter's avatar Dan Carpenter Committed by Greg Kroah-Hartman
Browse files

Staging: mrst-touchscreen: fix dereferencing free memory



I moved the kfree() down a couple lines after the dereference.

Signed-off-by: default avatarDan Carpenter <error27@gmail.com>
Acked-by: default avatarAlan Cox <alan@linux.intel.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
parent eb169d1c
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -817,9 +817,9 @@ static int mrstouch_remove(struct spi_device *spi)
	free_irq(mrstouchdevp->irq, mrstouchdevp);
	input_unregister_device(mrstouchdevp->input);
	input_free_device(mrstouchdevp->input);
	kfree(mrstouchdevp);
	if (mrstouchdevp->pendet_thrd)
		kthread_stop(mrstouchdevp->pendet_thrd);
	kfree(mrstouchdevp);
	return 0;
}