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.stricted.de/?a=commitdiff_plain;h=9e58d05a1b24d2c0471c3b4df8f473a7543d7647;p=GitHub%2Fmt8127%2Fandroid_kernel_alcatel_ttab.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;