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:
6ce4eac
)
EISA: Call put_device() if device_register() fails
author
Levente Kurusa
<levex@linux.com>
Fri, 13 Dec 2013 18:39:54 +0000
(19:39 +0100)
committer
Bjorn Helgaas
<bhelgaas@google.com>
Fri, 13 Dec 2013 19:00:42 +0000
(12:00 -0700)
We need to give up the last reference to edev->dev, so we need to call
put_device().
Signed-off-by: Levente Kurusa <levex@linux.com>
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
drivers/eisa/eisa-bus.c
patch
|
blob
|
history
diff --git
a/drivers/eisa/eisa-bus.c
b/drivers/eisa/eisa-bus.c
index 272a3ec3595703b6dbdaa440108eb569410cf65f..8842cde69177d76afc4681bb697b1d044026960c 100644
(file)
--- a/
drivers/eisa/eisa-bus.c
+++ b/
drivers/eisa/eisa-bus.c
@@
-232,8
+232,10
@@
static int __init eisa_init_device(struct eisa_root_device *root,
static int __init eisa_register_device(struct eisa_device *edev)
{
int rc = device_register(&edev->dev);
- if (rc)
+ if (rc) {
+ put_device(&edev->dev);
return rc;
+ }
rc = device_create_file(&edev->dev, &dev_attr_signature);
if (rc)