From: Eugene Surovegin Date: Fri, 11 Jul 2008 00:30:44 +0000 (-0700) Subject: rapidio: fix device reference counting X-Git-Tag: v2.6.26~23 X-Git-Url: http://pilppa.com/gitweb/?a=commitdiff_plain;h=a7de3902edce099e4102c1272ec0ab569c1791f7;p=linux-2.6-omap-h63xx.git rapidio: fix device reference counting Fix RapidIO device reference counting. Signed-of-by: Eugene Surovegin Cc: Matt Porter Cc: Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- diff --git a/drivers/rapidio/rio-driver.c b/drivers/rapidio/rio-driver.c index 3ce9f3defc1..956d3e79f6a 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; }