diff options
| -rw-r--r-- | sound/soc/codecs/wm8962.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/sound/soc/codecs/wm8962.c b/sound/soc/codecs/wm8962.c index b4eb975da981..85a2c5400d15 100644 --- a/sound/soc/codecs/wm8962.c +++ b/sound/soc/codecs/wm8962.c | |||
| @@ -3759,7 +3759,7 @@ static int wm8962_i2c_probe(struct i2c_client *i2c, | |||
| 3759 | ret = snd_soc_register_codec(&i2c->dev, | 3759 | ret = snd_soc_register_codec(&i2c->dev, |
| 3760 | &soc_codec_dev_wm8962, &wm8962_dai, 1); | 3760 | &soc_codec_dev_wm8962, &wm8962_dai, 1); |
| 3761 | if (ret < 0) | 3761 | if (ret < 0) |
| 3762 | goto err_enable; | 3762 | goto err_pm_runtime; |
| 3763 | 3763 | ||
| 3764 | regcache_cache_only(wm8962->regmap, true); | 3764 | regcache_cache_only(wm8962->regmap, true); |
| 3765 | 3765 | ||
| @@ -3768,6 +3768,8 @@ static int wm8962_i2c_probe(struct i2c_client *i2c, | |||
| 3768 | 3768 | ||
| 3769 | return 0; | 3769 | return 0; |
| 3770 | 3770 | ||
| 3771 | err_pm_runtime: | ||
| 3772 | pm_runtime_disable(&i2c->dev); | ||
| 3771 | err_enable: | 3773 | err_enable: |
| 3772 | regulator_bulk_disable(ARRAY_SIZE(wm8962->supplies), wm8962->supplies); | 3774 | regulator_bulk_disable(ARRAY_SIZE(wm8962->supplies), wm8962->supplies); |
| 3773 | err: | 3775 | err: |
| @@ -3777,6 +3779,7 @@ err: | |||
| 3777 | static int wm8962_i2c_remove(struct i2c_client *client) | 3779 | static int wm8962_i2c_remove(struct i2c_client *client) |
| 3778 | { | 3780 | { |
| 3779 | snd_soc_unregister_codec(&client->dev); | 3781 | snd_soc_unregister_codec(&client->dev); |
| 3782 | pm_runtime_disable(&client->dev); | ||
| 3780 | return 0; | 3783 | return 0; |
| 3781 | } | 3784 | } |
| 3782 | 3785 | ||
