diff options
| author | Linux Build Service Account <lnxbuild@localhost> | 2016-09-15 22:51:56 -0700 |
|---|---|---|
| committer | Gerrit - the friendly Code Review server <code-review@localhost> | 2016-09-15 22:51:56 -0700 |
| commit | 6c104f8d40e59cc9299ddef18d92709d8cda3483 (patch) | |
| tree | b271d6a93333378dbd8060b3e47565bbcf40d520 | |
| parent | a97736505b4fc8b2cfbcfd38a4e69a13532afe29 (diff) | |
| parent | 35b034ff27afcfcaedfa1e64f9e77576ae27187c (diff) | |
Merge "ASoC: audio-ext-clk: avoid multiple initialization of pinctrl_info"
| -rw-r--r--[-rwxr-xr-x] | sound/soc/codecs/audio-ext-clk.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/sound/soc/codecs/audio-ext-clk.c b/sound/soc/codecs/audio-ext-clk.c index c422267dbf2c..34b1d9481457 100755..100644 --- a/sound/soc/codecs/audio-ext-clk.c +++ b/sound/soc/codecs/audio-ext-clk.c @@ -193,7 +193,13 @@ static int audio_get_pinctrl(struct platform_device *pdev) int ret; pnctrl_info = &audio_ap_clk2.pnctrl_info; - pnctrl_info->pinctrl = NULL; + + if (pnctrl_info->pinctrl) { + dev_dbg(&pdev->dev, "%s: already requested before\n", + __func__); + return -EINVAL; + } + pinctrl = devm_pinctrl_get(&pdev->dev); if (IS_ERR_OR_NULL(pinctrl)) { dev_dbg(&pdev->dev, "%s: Unable to get pinctrl handle\n", |
