err = pm_runtime_set_suspended(ce->dev);
        if (err)
                return err;
-       pm_runtime_enable(ce->dev);
-       return err;
-}
 
-static void sun8i_ce_pm_exit(struct sun8i_ce_dev *ce)
-{
-       pm_runtime_disable(ce->dev);
+       err = devm_pm_runtime_enable(ce->dev);
+       if (err)
+               return err;
+
+       return 0;
 }
 
 static int sun8i_ce_get_clks(struct sun8i_ce_dev *ce)
                               "sun8i-ce-ns", ce);
        if (err) {
                dev_err(ce->dev, "Cannot request CryptoEngine Non-secure IRQ (err=%d)\n", err);
-               goto error_irq;
+               goto error_pm;
        }
 
        err = sun8i_ce_register_algs(ce);
        return 0;
 error_alg:
        sun8i_ce_unregister_algs(ce);
-error_irq:
-       sun8i_ce_pm_exit(ce);
 error_pm:
        sun8i_ce_free_chanlist(ce, MAXFLOW - 1);
        return err;
 #endif
 
        sun8i_ce_free_chanlist(ce, MAXFLOW - 1);
-
-       sun8i_ce_pm_exit(ce);
 }
 
 static const struct of_device_id sun8i_ce_crypto_of_match_table[] = {