File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -671,7 +671,15 @@ static int ak4458_runtime_resume(struct device *dev)
671671 regcache_cache_only (ak4458 -> regmap , false);
672672 regcache_mark_dirty (ak4458 -> regmap );
673673
674- return regcache_sync (ak4458 -> regmap );
674+ ret = regcache_sync (ak4458 -> regmap );
675+ if (ret )
676+ goto err ;
677+
678+ return 0 ;
679+ err :
680+ regcache_cache_only (ak4458 -> regmap , true);
681+ regulator_bulk_disable (ARRAY_SIZE (ak4458 -> supplies ), ak4458 -> supplies );
682+ return ret ;
675683}
676684
677685static const struct snd_soc_component_driver soc_codec_dev_ak4458 = {
Original file line number Diff line number Diff line change @@ -372,7 +372,15 @@ static int ak5558_runtime_resume(struct device *dev)
372372 regcache_cache_only (ak5558 -> regmap , false);
373373 regcache_mark_dirty (ak5558 -> regmap );
374374
375- return regcache_sync (ak5558 -> regmap );
375+ ret = regcache_sync (ak5558 -> regmap );
376+ if (ret )
377+ goto err ;
378+
379+ return 0 ;
380+ err :
381+ regcache_cache_only (ak5558 -> regmap , true);
382+ regulator_bulk_disable (ARRAY_SIZE (ak5558 -> supplies ), ak5558 -> supplies );
383+ return ret ;
376384}
377385
378386static const struct dev_pm_ops ak5558_pm = {
You can’t perform that action at this time.
0 commit comments