[PATCH 118/124] UAS: fix deadlock in error handling and PM flushing work