[PATCH 4.18 24/44] PM / core: Clear the direct_complete flag on errors