]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
Staging: ipack/bridges/tpci200: avoid kernel bug when uninstalling a device
authorSamuel Iglesias Gonsálvez <siglesias@igalia.com>
Fri, 20 Jul 2012 07:39:03 +0000 (09:39 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 14 Aug 2012 01:53:55 +0000 (18:53 -0700)
Signed-off-by: Samuel Iglesias Gonsálvez <siglesias@igalia.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/ipack/bridges/tpci200.c

index 2b83fa8e550a6951684b99dd727ff9f3e731e8a7..a7fb2cfe51ee37520cd58fcc96d14173405a56cc 100644 (file)
@@ -604,8 +604,8 @@ static int tpci200_slot_unregister(struct ipack_device *dev)
        if (mutex_lock_interruptible(&tpci200->mutex))
                return -ERESTARTSYS;
 
-       ipack_device_unregister(dev);
        tpci200->slots[dev->slot].dev = NULL;
+       ipack_device_unregister(dev);
        mutex_unlock(&tpci200->mutex);
 
        return 0;