]> pilppa.com Git - linux-2.6-omap-h63xx.git/commitdiff
[POWERPC] iSeries: Fix ref counting in vio setup
authorStephen Rothwell <sfr@canb.auug.org.au>
Tue, 6 Nov 2007 06:26:42 +0000 (17:26 +1100)
committerPaul Mackerras <paulus@samba.org>
Thu, 8 Nov 2007 03:15:33 +0000 (14:15 +1100)
Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: Paul Mackerras <paulus@samba.org>
arch/powerpc/platforms/iseries/vio.c

index d6435b03971f1e9d087a7d643828a653e559e1fd..be06cfd9fa3d5e20afbeaf7f444ce5bc4ea5c172 100644 (file)
@@ -523,15 +523,16 @@ static void __init get_viotape_info(struct device_node *vio_root)
 static int __init iseries_vio_init(void)
 {
        struct device_node *vio_root;
+       int ret = -ENODEV;
 
        if (!firmware_has_feature(FW_FEATURE_ISERIES))
-               return -ENODEV;
+               goto out;
 
        iommu_vio_init();
 
        vio_root = of_find_node_by_path("/vdevice");
        if (!vio_root)
-               return -ENODEV;
+               goto out;
 
        if (viopath_hostLp == HvLpIndexInvalid) {
                vio_set_hostlp();
@@ -544,10 +545,11 @@ static int __init iseries_vio_init(void)
        get_viocd_info(vio_root);
        get_viotape_info(vio_root);
 
-       return 0;
+       ret = 0;
 
  put_node:
        of_node_put(vio_root);
-       return -ENODEV;
+ out:
+       return ret;
 }
 arch_initcall(iseries_vio_init);