]> pilppa.com Git - linux-2.6-omap-h63xx.git/commitdiff
rapidio: fix device reference counting
authorEugene Surovegin <ebs@ebshome.net>
Fri, 11 Jul 2008 00:30:44 +0000 (17:30 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Fri, 11 Jul 2008 01:04:43 +0000 (18:04 -0700)
Fix RapidIO device reference counting.

Signed-of-by: Eugene Surovegin <ebs@ebshome.net>
Cc: Matt Porter <mporter@kernel.crashing.org>
Cc: <stable@kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
drivers/rapidio/rio-driver.c

index 3ce9f3defc1287f688f6484f2f265b7cdb620125..956d3e79f6aaab9c701be85526dbade07cd69a3b 100644 (file)
@@ -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;
 }