From: Samuel Iglesias Gonsálvez Date: Fri, 20 Jul 2012 07:39:03 +0000 (+0200) Subject: Staging: ipack/bridges/tpci200: avoid kernel bug when uninstalling a device X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=9e58d05a1b24d2c0471c3b4df8f473a7543d7647;p=linux-beck.git Staging: ipack/bridges/tpci200: avoid kernel bug when uninstalling a device Signed-off-by: Samuel Iglesias Gonsálvez Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/staging/ipack/bridges/tpci200.c b/drivers/staging/ipack/bridges/tpci200.c index 2b83fa8e550a..a7fb2cfe51ee 100644 --- a/drivers/staging/ipack/bridges/tpci200.c +++ b/drivers/staging/ipack/bridges/tpci200.c @@ -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;