From: Eugene Surovegin Date: Fri, 11 Jul 2008 00:30:44 +0000 (-0700) Subject: rapidio: fix device reference counting X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=a7de3902edce099e4102c1272ec0ab569c1791f7;p=GitHub%2FLineageOS%2FG12%2Fandroid_kernel_amlogic_linux-4.9.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; }