summaryrefslogtreecommitdiffstats
path: root/drivers/char/ppdev.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/char/ppdev.c')
-rw-r--r--drivers/char/ppdev.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/char/ppdev.c b/drivers/char/ppdev.c
index 6af1ce04b3da..f08f3ed98e01 100644
--- a/drivers/char/ppdev.c
+++ b/drivers/char/ppdev.c
@@ -305,10 +305,10 @@ static int register_device(int minor, struct pp_struct *pp)
ppdev_cb.private = pp;
pdev = parport_register_dev_model(port, name, &ppdev_cb, minor);
parport_put_port(port);
+ kfree(name);
if (!pdev) {
printk(KERN_WARNING "%s: failed to register device!\n", name);
- kfree(name);
return -ENXIO;
}