From: Eugene Surovegin Date: Fri, 11 Jul 2008 00:30:44 +0000 (-0700) Subject: rapidio: fix device reference counting X-Git-Tag: MMI-PSA29.97-13-9~33727 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=a7de3902edce099e4102c1272ec0ab569c1791f7;p=GitHub%2FMotorolaMobilityLLC%2Fkernel-slsi.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 3ce9f3defc12..956d3e79f6aa 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; }