Commit c1600f7c authored by Rolf Eike Beer's avatar Rolf Eike Beer Committed by Deepak Saxena

[PATCH] CompactPCI: remove two useless checks

This two checks are useless: cpci_hp_register_bus is only called from two
places, one has constant arguments, the other one passes the module
parameters which are checked for this condition on module load. And the bus
argument of cpci_hp_unregister_bus can never be NULL, all functions calling
this function use fields of the bus struct before so they will oops if it
would ever be NULL.

Eike
parent 7c39c065
......@@ -293,9 +293,6 @@ cpci_hp_register_bus(struct pci_bus *bus, u8 first, u8 last)
if(!(controller && bus)) {
return -ENODEV;
}
if(last < first) {
return -EINVAL;
}
/*
* Create a structure for each slot, and register that slot
......@@ -379,10 +376,6 @@ cpci_hp_unregister_bus(struct pci_bus *bus)
struct list_head *next;
int status;
if(!bus) {
return -ENODEV;
}
spin_lock(&list_lock);
if(!slots) {
spin_unlock(&list_lock);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment