Drivers: char: misc: 'misc_deregister()' changed the 'mutex_unlock' logic upon an...
authorElad Wexler <elad.wexler@gmail.com>
Sat, 14 Sep 2013 15:02:11 +0000 (18:02 +0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 26 Sep 2013 15:53:23 +0000 (08:53 -0700)
commit684116caa44d1642fcbd4d1d5b9cb975572cfa0b
tree422fad1cdcf2f61bcbc7538fff531aee48fa3a8a
parentbbf831dfe8538ef3797c9603b7897d4ad9ef9d4a
Drivers: char: misc: 'misc_deregister()' changed the 'mutex_unlock' logic upon an error

This change improves code readability & is less error-prone.
For example: case adding more error paths one should remember to call 'mutex_unlock'

Signed-off-by: Elad Wexler <elad.wexler@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/char/misc.c