From: Travis Spencer <tspencer@cs.pdx.edu>
To: kernel-janitors@vger.kernel.org
Subject: [KJ] [PATCH 2.6.12-rc4-kj] Reorganization of control flow to
Date: Sat, 21 May 2005 01:41:11 +0000 [thread overview]
Message-ID: <20050521014111.GF20819@ruby.cat.pdx.edu> (raw)
[-- Attachment #1: Type: text/plain, Size: 1100 bytes --]
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.
Signed-off-by: Travis L. Spencer <tspencer@cs.pdx.edu>
--- linux-2.6.12-rc4-kj/drivers/isdn/hisax/hisax_fcpcipnp.c 2005-05-20 18:12:40.814317000 -0700
+++ mytree/drivers/isdn/hisax/hisax_fcpcipnp.c 2005-05-20 18:34:13.282605000 -0700
@@ -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;
}
[-- Attachment #2: Type: text/plain, Size: 167 bytes --]
_______________________________________________
Kernel-janitors mailing list
Kernel-janitors@lists.osdl.org
http://lists.osdl.org/mailman/listinfo/kernel-janitors
reply other threads:[~2005-05-21 1:41 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20050521014111.GF20819@ruby.cat.pdx.edu \
--to=tspencer@cs.pdx.edu \
--cc=kernel-janitors@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.