[PATCH 4.14 18/45] PM / core: Clear the direct_complete flag on errors