Commit 69975619 authored by Dmitry Torokhov's avatar Dmitry Torokhov

Input: fm801-gp - fix use after free

Fixes Coverity #id 916
Signed-off-by: default avatarDmitry Torokhov <dtor@mail.ru>
parent c7948989
...@@ -106,10 +106,10 @@ static int __devinit fm801_gp_probe(struct pci_dev *pci, const struct pci_device ...@@ -106,10 +106,10 @@ static int __devinit fm801_gp_probe(struct pci_dev *pci, const struct pci_device
gp->gameport = port; gp->gameport = port;
gp->res_port = request_region(port->io, 0x10, "FM801 GP"); gp->res_port = request_region(port->io, 0x10, "FM801 GP");
if (!gp->res_port) { if (!gp->res_port) {
kfree(gp);
gameport_free_port(port);
printk(KERN_DEBUG "fm801-gp: unable to grab region 0x%x-0x%x\n", printk(KERN_DEBUG "fm801-gp: unable to grab region 0x%x-0x%x\n",
port->io, port->io + 0x0f); port->io, port->io + 0x0f);
gameport_free_port(port);
kfree(gp);
return -EBUSY; return -EBUSY;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment