int nodenum;
        struct list_head *pos;
 
-       if (!protocol)
-               return -EINVAL;
-
        INIT_LIST_HEAD(&protocol->devices);
        INIT_LIST_HEAD(&protocol->cards);
        nodenum = 0;
        struct pnp_id *id;
        struct pnp_id *next;
 
-       if (!dev)
-               return;
        id = dev->id;
        while (id) {
                next = id->next;
  */
 int pnp_add_device(struct pnp_dev *dev)
 {
-       if (!dev || !dev->protocol || dev->card)
+       if (dev->card)
                return -EINVAL;
        dev->dev.parent = &dev->protocol->dev;
        sprintf(dev->dev.bus_id, "%02x:%02x", dev->protocol->number,
 
        resource_size_t *start, *end;
        unsigned long *flags;
 
-       if (!dev || !rule)
-               return -EINVAL;
-
        if (idx >= PNP_MAX_PORT) {
                pnp_err
                    ("More than 4 ports is incompatible with pnp specifications.");
        resource_size_t *start, *end;
        unsigned long *flags;
 
-       if (!dev || !rule)
-               return -EINVAL;
-
        if (idx >= PNP_MAX_MEM) {
                pnp_err
                    ("More than 8 mems is incompatible with pnp specifications.");
                5, 10, 11, 12, 9, 14, 15, 7, 3, 4, 13, 0, 1, 6, 8, 2
        };
 
-       if (!dev || !rule)
-               return -EINVAL;
-
        if (idx >= PNP_MAX_IRQ) {
                pnp_err
                    ("More than 2 irqs is incompatible with pnp specifications.");
                1, 3, 5, 6, 7, 0, 2, 4
        };
 
-       if (!dev || !rule)
-               return -EINVAL;
-
        if (idx >= PNP_MAX_DMA) {
                pnp_err
                    ("More than 2 dmas is incompatible with pnp specifications.");
        int i;
        struct pnp_resource_table *bak;
 
-       if (!dev || !res)
-               return -EINVAL;
        if (!pnp_can_configure(dev))
                return -ENODEV;
        bak = pnp_alloc(sizeof(struct pnp_resource_table));
        struct pnp_option *dep;
        int i = 1;
 
-       if (!dev)
-               return -EINVAL;
-
        if (!pnp_can_configure(dev)) {
                pnp_dbg("Device %s does not support resource configuration.",
                        dev->dev.bus_id);
 {
        int error;
 
-       if (!dev)
-               return -EINVAL;
        if (dev->active)
                return 0;       /* the device is already active */
 
 {
        int error;
 
-       if (!dev)
-               return -EINVAL;
        if (!dev->active)
                return 0;       /* the device is already disabled */
 
 void pnp_resource_change(struct resource *resource, resource_size_t start,
                         resource_size_t size)
 {
-       if (resource == NULL)
-               return;
        resource->flags &= ~(IORESOURCE_AUTO | IORESOURCE_UNSET);
        resource->start = start;
        resource->end = start + size - 1;
 
 {
        struct pnp_option *option;
 
-       if (!dev)
-               return NULL;
-
        option = pnp_build_option(PNP_RES_PRIORITY_PREFERRED);
 
        /* this should never happen but if it does we'll try to continue */
 {
        struct pnp_option *option;
 
-       if (!dev)
-               return NULL;
-
        option = pnp_build_option(priority);
 
        if (dev->dependent) {
 {
        struct pnp_irq *ptr;
 
-       if (!option)
-               return -EINVAL;
-       if (!data)
-               return -EINVAL;
-
        ptr = option->irq;
        while (ptr && ptr->next)
                ptr = ptr->next;
 {
        struct pnp_dma *ptr;
 
-       if (!option)
-               return -EINVAL;
-       if (!data)
-               return -EINVAL;
-
        ptr = option->dma;
        while (ptr && ptr->next)
                ptr = ptr->next;
 {
        struct pnp_port *ptr;
 
-       if (!option)
-               return -EINVAL;
-       if (!data)
-               return -EINVAL;
-
        ptr = option->port;
        while (ptr && ptr->next)
                ptr = ptr->next;
 {
        struct pnp_mem *ptr;
 
-       if (!option)
-               return -EINVAL;
-       if (!data)
-               return -EINVAL;
-
        ptr = option->mem;
        while (ptr && ptr->next)
                ptr = ptr->next;