Message ID | 20170904124638.DB4C44400FC@finisterre.ee.mobilebroadband |
---|---|
State | Accepted |
Commit | 6431a7e36652517df82855ee79c8240001812a55 |
Headers | show |
Series | Applied "ASoC: samsung: i2s: Fix error handling path in i2s_set_sysclk()" to the asoc tree | expand |
diff --git a/sound/soc/samsung/i2s.c b/sound/soc/samsung/i2s.c index 10a4da06c0a1..d7e7f4244d38 100644 --- a/sound/soc/samsung/i2s.c +++ b/sound/soc/samsung/i2s.c @@ -552,8 +552,11 @@ static int i2s_set_sysclk(struct snd_soc_dai *dai, } ret = clk_prepare_enable(i2s->op_clk); - if (ret) + if (ret) { + clk_put(i2s->op_clk); + i2s->op_clk = NULL; goto err; + } i2s->rclk_srcrate = clk_get_rate(i2s->op_clk); /* Over-ride the other's */