Skip to content

Commit

Permalink
[PATCH] initialisation cleanup for ULI526x-net-driver
Browse files Browse the repository at this point in the history
removes the unneeded local variable rc
replace pci_module_init() with pci_register_driver()
two coding style issues on switch

Signed-off-by: Henrik Kretzschmar <henne@nachtwindheim.de>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
  • Loading branch information
Henrik Kretzschmar authored and Jeff Garzik committed Jul 29, 2006
1 parent a8bed49 commit e1c3e50
Showing 1 changed file with 4 additions and 8 deletions.
12 changes: 4 additions & 8 deletions drivers/net/tulip/uli526x.c
Original file line number Diff line number Diff line change
Expand Up @@ -1702,7 +1702,6 @@ MODULE_PARM_DESC(mode, "ULi M5261/M5263: Bit 0: 10/100Mbps, bit 2: duplex, bit 8

static int __init uli526x_init_module(void)
{
int rc;

printk(version);
printed_version = 1;
Expand All @@ -1714,22 +1713,19 @@ static int __init uli526x_init_module(void)
if (cr6set)
uli526x_cr6_user_set = cr6set;

switch(mode) {
switch (mode) {
case ULI526X_10MHF:
case ULI526X_100MHF:
case ULI526X_10MFD:
case ULI526X_100MFD:
uli526x_media_mode = mode;
break;
default:uli526x_media_mode = ULI526X_AUTO;
default:
uli526x_media_mode = ULI526X_AUTO;
break;
}

rc = pci_module_init(&uli526x_driver);
if (rc < 0)
return rc;

return 0;
return pci_register_driver(&uli526x_driver);
}


Expand Down

0 comments on commit e1c3e50

Please sign in to comment.