If the user passes an invalid command, then we don't drop the lock
before returning. The check for invalid commands doesn't need to be
done under lock so I moved it forward a couple lines.
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>