aboutsummaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorDmitry Torokhov <dtor@insightbb.com>2006-07-06 23:54:30 -0400
committerDmitry Torokhov <dtor@insightbb.com>2006-07-06 23:54:30 -0400
commit699756199d65700e8deed59ae250439ca8684686 (patch)
treedad2c203b93377f84d0385a3dedda643a792c92c /drivers
parentc7948989f84ee6e9c68cc643f8c6a635eb7a904b (diff)
Input: fm801-gp - fix use after free
Fixes Coverity #id 916 Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/input/gameport/fm801-gp.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/input/gameport/fm801-gp.c b/drivers/input/gameport/fm801-gp.c
index 47e93daa0fa..90de5afe03c 100644
--- a/drivers/input/gameport/fm801-gp.c
+++ b/drivers/input/gameport/fm801-gp.c
@@ -106,10 +106,10 @@ static int __devinit fm801_gp_probe(struct pci_dev *pci, const struct pci_device
gp->gameport = port;
gp->res_port = request_region(port->io, 0x10, "FM801 GP");
if (!gp->res_port) {
- kfree(gp);
- gameport_free_port(port);
printk(KERN_DEBUG "fm801-gp: unable to grab region 0x%x-0x%x\n",
port->io, port->io + 0x0f);
+ gameport_free_port(port);
+ kfree(gp);
return -EBUSY;
}