Staging: ipack/bridges/tpci200: removed check of tpci200->slots[dev->slot].dev
authorSamuel Iglesias Gonsalvez <siglesias@igalia.com>
Wed, 23 May 2012 13:54:47 +0000 (15:54 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 7 Jun 2012 05:14:08 +0000 (14:14 +0900)
When ipack_device_register() is called, the variable
tpci200->slots[dev->slot].dev has not assigned a value and it gives an error
when the mezzanine driver is reading a register from the board for the match()
function, as all the I/O functions call check_slot().

Signed-off-by: Samuel Iglesias Gonsalvez <siglesias@igalia.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/ipack/bridges/tpci200.c

index 96bfe5b3ca2390a3fd169f9ad52068cae43697b8..67516255480b7b07460898185e1fef2f9a8db966 100644 (file)
@@ -59,13 +59,6 @@ static struct tpci200_board *check_slot(struct ipack_device *dev)
                return NULL;
        }
 
-       BUG_ON(tpci200->slots == NULL);
-       if (tpci200->slots[dev->slot].dev == NULL) {
-               pr_info("Slot [%d:%d] is not registered !\n", dev->bus_nr,
-                       dev->slot);
-               return NULL;
-       }
-
        return tpci200;
 }