2008-06-29 05:32:21

by Eugene Surovegin

[permalink] [raw]
Subject: [PATCH] RapidIO: fix device reference counting

Fix RapidIO device reference counting.

Signed-of-by: Eugene Surovegin <[email protected]>
---

diff --git a/drivers/rapidio/rio-driver.c b/drivers/rapidio/rio-driver.c
index 3ce9f3d..956d3e7 100644
--- a/drivers/rapidio/rio-driver.c
+++ b/drivers/rapidio/rio-driver.c
@@ -101,8 +101,8 @@ static int rio_device_probe(struct device *dev)
if (error >= 0) {
rdev->driver = rdrv;
error = 0;
+ } else
rio_dev_put(rdev);
- }
}
return error;
}