aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBjorn Helgaas <bhelgaas@google.com>2013-12-18 16:00:56 -0500
committerBjorn Helgaas <bhelgaas@google.com>2013-12-18 16:00:56 -0500
commite338e49dbbbdef27b0a570603b60481b3753eddf (patch)
treef3a1e58152848b2c1c593fb606f5f817a3913b85
parent1d72e71d4542d2eff16c74242f7e5dfca38fb49a (diff)
parent04df008afe0c569fd09400a35b7d3db29067114c (diff)
Merge branch 'eisa' into next
* eisa: EISA: Call put_device() if device_register() fails
-rw-r--r--drivers/eisa/eisa-bus.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/eisa/eisa-bus.c b/drivers/eisa/eisa-bus.c
index 272a3ec35957..8842cde69177 100644
--- 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,
232static int __init eisa_register_device(struct eisa_device *edev) 232static int __init eisa_register_device(struct eisa_device *edev)
233{ 233{
234 int rc = device_register(&edev->dev); 234 int rc = device_register(&edev->dev);
235 if (rc) 235 if (rc) {
236 put_device(&edev->dev);
236 return rc; 237 return rc;
238 }
237 239
238 rc = device_create_file(&edev->dev, &dev_attr_signature); 240 rc = device_create_file(&edev->dev, &dev_attr_signature);
239 if (rc) 241 if (rc)