It's better to set the device's driver data to NULL
when remove it.
Signed-off-by: Wanlong Gao <redacted>
---
drivers/input/misc/pcap_keys.c | 2 ++
1 files changed, 2 insertions(+), 0 deletions(-)
diff --git a/drivers/input/misc/pcap_keys.c b/drivers/input/misc/pcap_keys.c
index 99335c2..6c670f5 100644
--- a/drivers/input/misc/pcap_keys.c
+++ b/drivers/input/misc/pcap_keys.c
@@ -114,6 +114,8 @@ static int __devexit pcap_keys_remove(struct platform_device *pdev)
input_unregister_device(pcap_keys->input);
kfree(pcap_keys);
+ platform_set_drvdata(pdev, NULL);
+
return 0;
}
--
1.7.4.1