Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

Merge tag 'hwspinlock-3.6-fix' of git://git.kernel.org/pub/scm/linux/kernel/git/ohad/hwspinlock

Pull hwspinlock fix from Ohad Ben-Cohen:
"A single hwspinlock fix by Wei Yongjun, which prevents potential NULL
dereferences"

* tag 'hwspinlock-3.6-fix' of git://git.kernel.org/pub/scm/linux/kernel/git/ohad/hwspinlock:
hwspinlock/core: move the dereference below the NULL test

+2 -1
+2 -1
drivers/hwspinlock/hwspinlock_core.c
··· 552 552 */ 553 553 int hwspin_lock_free(struct hwspinlock *hwlock) 554 554 { 555 - struct device *dev = hwlock->bank->dev; 555 + struct device *dev; 556 556 struct hwspinlock *tmp; 557 557 int ret; 558 558 ··· 561 561 return -EINVAL; 562 562 } 563 563 564 + dev = hwlock->bank->dev; 564 565 mutex_lock(&hwspinlock_tree_lock); 565 566 566 567 /* make sure the hwspinlock is used */