Skip to contentSkip to conversation

Reorganization of control flow to

PATCH New Travis Spencer 1 participant 1 message May 21, 2005 Kernel janitors

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Reorganization of control flow to

When the macro __ISAPNP__' isn't defined, the label out_unregister_pci' is never used. This causes a warning from the compiler. To suppress it, this patch reorganizes the flow of control to use a single point of exit and removes the goto statements.

drivers/isdn/hisax/hisax_fcpcipnp.c +8 -10
@@ -1001,18 +1001,16 @@ static int __init hisax_fcpcipnp_init(vo
 	printk(KERN_INFO "hisax_fcpcipnp: Fritz!Card PCI/PCIv2/PnP ISDN driver v0.0.1\n");
 
 	retval = pci_register_driver(&fcpci_driver);
-	if (retval)
-		goto out;
+	if (! retval)
+	{
 #ifdef __ISAPNP__
-	retval = pnp_register_driver(&fcpnp_driver);
-	if (retval < 0)
-		goto out_unregister_pci;
+		retval = pnp_register_driver(&fcpnp_driver);
+		if (retval < 0)
+			pci_unregister_driver(&fcpci_driver);
+		else
 #endif
-	return 0;
-
- out_unregister_pci:
-	pci_unregister_driver(&fcpci_driver);
- out:
+			retval = 0;
+	}
 	return retval;
 }
 

_______________________________________________
Kernel-janitors mailing list
[email protected]
http://lists.osdl.org/mailman/listinfo/kernel-janitors