From d345d97012c3f8fb72c0c9d2ee319ea958b63229 Mon Sep 17 00:00:00 2001 From: Dmitry Torokhov Date: Wed, 29 Sep 2010 18:17:16 -0700 Subject: Input: fm801-gp - add missing call to pci_disable_device() Signed-off-by: Dmitry Torokhov --- drivers/input/gameport/emu10k1-gp.c | 3 ++- drivers/input/gameport/fm801-gp.c | 10 +++++----- 2 files changed, 7 insertions(+), 6 deletions(-) (limited to 'drivers/input/gameport') diff --git a/drivers/input/gameport/emu10k1-gp.c b/drivers/input/gameport/emu10k1-gp.c index 34615d40528a..f85620590b66 100644 --- a/drivers/input/gameport/emu10k1-gp.c +++ b/drivers/input/gameport/emu10k1-gp.c @@ -106,8 +106,9 @@ static void __devexit emu_remove(struct pci_dev *pdev) gameport_unregister_port(emu->gameport); release_region(emu->io, emu->size); - pci_disable_device(pdev); kfree(emu); + + pci_disable_device(pdev); } static struct pci_driver emu_driver = { diff --git a/drivers/input/gameport/fm801-gp.c b/drivers/input/gameport/fm801-gp.c index 14d3f3e208a2..a3b70ff21018 100644 --- a/drivers/input/gameport/fm801-gp.c +++ b/drivers/input/gameport/fm801-gp.c @@ -133,11 +133,11 @@ static void __devexit fm801_gp_remove(struct pci_dev *pci) { struct fm801_gp *gp = pci_get_drvdata(pci); - if (gp) { - gameport_unregister_port(gp->gameport); - release_resource(gp->res_port); - kfree(gp); - } + gameport_unregister_port(gp->gameport); + release_resource(gp->res_port); + kfree(gp); + + pci_disable_device(pci); } static const struct pci_device_id fm801_gp_id_table[] = { -- cgit v1.2.2