]> git.karo-electronics.de Git - karo-tx-linux.git/blobdiff - drivers/hwspinlock/hwspinlock_core.c
Merge branches 'from-henrik', 'hidraw', 'logitech', 'picolcd', 'ps3', 'uclogic',...
[karo-tx-linux.git] / drivers / hwspinlock / hwspinlock_core.c
index 1201a15784c3a0eec329affa6f6edf1546df0b51..db713c0dfba4d6c6272ac19c79b793595a9cdad7 100644 (file)
@@ -552,7 +552,7 @@ EXPORT_SYMBOL_GPL(hwspin_lock_request_specific);
  */
 int hwspin_lock_free(struct hwspinlock *hwlock)
 {
-       struct device *dev = hwlock->bank->dev;
+       struct device *dev;
        struct hwspinlock *tmp;
        int ret;
 
@@ -561,6 +561,7 @@ int hwspin_lock_free(struct hwspinlock *hwlock)
                return -EINVAL;
        }
 
+       dev = hwlock->bank->dev;
        mutex_lock(&hwspinlock_tree_lock);
 
        /* make sure the hwspinlock is used */