ChangeSet 1.1587.12.82, 2004/05/11 14:40:08-07:00, eike-hotplug@sf-tec.de [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 drivers/pci/hotplug/cpci_hotplug_core.c | 7 ------- 1 files changed, 7 deletions(-) diff -Nru a/drivers/pci/hotplug/cpci_hotplug_core.c b/drivers/pci/hotplug/cpci_hotplug_core.c --- a/drivers/pci/hotplug/cpci_hotplug_core.c Mon May 17 16:57:34 2004 +++ b/drivers/pci/hotplug/cpci_hotplug_core.c Mon May 17 16:57:34 2004 @@ -293,9 +293,6 @@ if(!(controller && bus)) { return -ENODEV; } - if(last < first) { - return -EINVAL; - } /* * Create a structure for each slot, and register that slot @@ -378,10 +375,6 @@ struct list_head *tmp; struct list_head *next; int status; - - if(!bus) { - return -ENODEV; - } spin_lock(&list_lock); if(!slots) {