mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-31 04:01:48 -04:00
rtc: ds1374, fix lock imbalance
When i2c_smbus_read_byte_data fails in ds1374_work, we forgot to unlock the held lock. Fix that. Signed-off-by: Jiri Slaby <[email protected]> Cc: Alessandro Zummo <[email protected]> Cc: Scott Wood <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
This commit is contained in:
parent
efc0cfa6d1
commit
28df30e61b
1 changed files with 2 additions and 2 deletions
|
|
@ -283,7 +283,7 @@ static void ds1374_work(struct work_struct *work)
|
|||
|
||||
stat = i2c_smbus_read_byte_data(client, DS1374_REG_SR);
|
||||
if (stat < 0)
|
||||
return;
|
||||
goto unlock;
|
||||
|
||||
if (stat & DS1374_REG_SR_AF) {
|
||||
stat &= ~DS1374_REG_SR_AF;
|
||||
|
|
@ -302,7 +302,7 @@ static void ds1374_work(struct work_struct *work)
|
|||
out:
|
||||
if (!ds1374->exiting)
|
||||
enable_irq(client->irq);
|
||||
|
||||
unlock:
|
||||
mutex_unlock(&ds1374->mutex);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue