projects
/
firefly-linux-kernel-4.4.55.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
52721d9
)
parport: fix error handling
author
Sudip Mukherjee
<sudipm.mukherjee@gmail.com>
Mon, 15 Jun 2015 14:35:49 +0000
(20:05 +0530)
committer
Greg Kroah-Hartman
<gregkh@linuxfoundation.org>
Thu, 23 Jul 2015 04:15:49 +0000
(21:15 -0700)
After registering the device if exclusive access fails for any reason
then we need to unregister the device to remove all references.
Signed-off-by: Sudip Mukherjee <sudip@vectorindia.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/parport/share.c
patch
|
blob
|
history
diff --git
a/drivers/parport/share.c
b/drivers/parport/share.c
index 8067f54ce050a6c8cf3a4c18d9b4ea560f017d94..d8079e37a60622dc11a498bbfb2b5508db3431b2 100644
(file)
--- a/
drivers/parport/share.c
+++ b/
drivers/parport/share.c
@@
-907,7
+907,8
@@
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);
- goto err_put_dev;
+ device_unregister(&par_dev->dev);
+ goto err_put_port;
}
port->flags |= PARPORT_FLAG_EXCL;
}