diff options
author | Johan Hedberg <johan.hedberg@nokia.com> | 2007-08-28 08:47:33 +0000 |
---|---|---|
committer | Johan Hedberg <johan.hedberg@nokia.com> | 2007-08-28 08:47:33 +0000 |
commit | 4327a133c205d5fbeb3a823f62d2f6fa3cc73279 (patch) | |
tree | 833804afd139c890712f04f750afbf28e765564e /audio/headset.c | |
parent | 770f024d7ca279390820569f46061830b3b89330 (diff) |
Make headset_unlock a no-op if the headset isn't locked
Diffstat (limited to 'audio/headset.c')
-rw-r--r-- | audio/headset.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/audio/headset.c b/audio/headset.c index 1a4b1171..bcaa4912 100644 --- a/audio/headset.c +++ b/audio/headset.c @@ -1584,6 +1584,9 @@ gboolean headset_unlock(struct device *dev, void *data) { struct headset *hs = dev->headset; + if (!hs->locked) + return FALSE; + hs->locked = FALSE; headset_set_state(dev, HEADSET_STATE_DISCONNECTED); |