projects
/
linux-2.6-microblaze.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
rapidio: fix possible name leaks when rio_add_device() fails
[linux-2.6-microblaze.git]
/
drivers
/
rapidio
/
devices
/
rio_mport_cdev.c
diff --git
a/drivers/rapidio/devices/rio_mport_cdev.c
b/drivers/rapidio/devices/rio_mport_cdev.c
index
2cdc054
..
3cc8399
100644
(file)
--- a/
drivers/rapidio/devices/rio_mport_cdev.c
+++ b/
drivers/rapidio/devices/rio_mport_cdev.c
@@
-1804,8
+1804,11
@@
static int rio_mport_add_riodev(struct mport_cdev_priv *priv,
rio_init_dbell_res(&rdev->riores[RIO_DOORBELL_RESOURCE],
0, 0xffff);
err = rio_add_device(rdev);
- if (err)
- goto cleanup;
+ if (err) {
+ put_device(&rdev->dev);
+ return err;
+ }
+
rio_dev_get(rdev);
return 0;