summaryrefslogtreecommitdiffstats
path: root/drivers/parport/share.c
diff options
context:
space:
mode:
authorIngo Molnar <mingo@kernel.org>2019-06-17 12:29:16 +0200
committerIngo Molnar <mingo@kernel.org>2019-06-17 12:29:16 +0200
commitbddb3636737f658886a0a02b64db5366bba3428e (patch)
tree8f7ffcb42803fa0bb3378ef969545e4a5e57262c /drivers/parport/share.c
parent3384c78631dd722c2cdc5c57fbdd39fc1b5a9f2d (diff)
parentcbb99c0f588737ec98c333558922ce47e9a95827 (diff)
downloadlinux-bddb3636737f658886a0a02b64db5366bba3428e.tar.bz2
Merge branch 'x86/cpu' into perf/core, to pick up dependent changes
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Diffstat (limited to 'drivers/parport/share.c')
-rw-r--r--drivers/parport/share.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/parport/share.c b/drivers/parport/share.c
index 5dc53d420ca8..7b4ee33c1935 100644
--- a/drivers/parport/share.c
+++ b/drivers/parport/share.c
@@ -895,6 +895,7 @@ parport_register_dev_model(struct parport *port, const char *name,
par_dev->devmodel = true;
ret = device_register(&par_dev->dev);
if (ret) {
+ kfree(par_dev->state);
put_device(&par_dev->dev);
goto err_put_port;
}
@@ -912,6 +913,7 @@ parport_register_dev_model(struct parport *port, const char *name,
spin_unlock(&port->physport->pardevice_lock);
pr_debug("%s: cannot grant exclusive access for device %s\n",
port->name, name);
+ kfree(par_dev->state);
device_unregister(&par_dev->dev);
goto err_put_port;
}