mirror of
https://github.com/adulau/aha.git
synced 2024-12-27 19:26:25 +00:00
mtd: cfi_cmdset_0002, fix lock imbalance
Stanse found a double unlock in get_chip. get_chip is called with chip->mutex held and caller is responsible for unlocking it too. Do not unlock the lock in get_chip on a fail path. This would mean a double unlock. Signed-off-by: Jiri Slaby <jslaby@suse.cz> Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
This commit is contained in:
parent
51eeb87815
commit
caf0e8e028
1 changed files with 0 additions and 1 deletions
|
@ -569,7 +569,6 @@ static int get_chip(struct map_info *map, struct flchip *chip, unsigned long adr
|
|||
|
||||
if (time_after(jiffies, timeo)) {
|
||||
printk(KERN_ERR "Waiting for chip to be ready timed out.\n");
|
||||
spin_unlock(chip->mutex);
|
||||
return -EIO;
|
||||
}
|
||||
spin_unlock(chip->mutex);
|
||||
|
|
Loading…
Reference in a new issue