]> Devoid-pointer.net GitWeb - omnibook.git/commitdiff
Unlock mutex in fail path.
authorMichal Malý <madcatxster@prifuk.cz>
Tue, 20 Aug 2013 11:49:09 +0000 (13:49 +0200)
committerMichal Malý <madcatxster@prifuk.cz>
Tue, 20 Aug 2013 11:49:09 +0000 (13:49 +0200)
cooling.c

index d7bae1b1933d488d000774391ef20863e33dbaca..80d1215ac876000333dfc9c0158b73bd01a0f4f3 100755 (executable)
--- a/cooling.c
+++ b/cooling.c
@@ -72,9 +72,8 @@ static int omnibook_cooling_write(char *buffer, struct omnibook_operation *io_op
        if (!retval)
                io_op->backend->cooling_state = *buffer - '0' ;
 
-       mutex_unlock(&io_op->backend->mutex);
-
        out:
+       mutex_unlock(&io_op->backend->mutex);
        return retval;
 }