diff options
-rw-r--r-- | sound/soc/codecs/max98373.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sound/soc/codecs/max98373.c b/sound/soc/codecs/max98373.c index eb709d528259..cae1def8902d 100644 --- a/sound/soc/codecs/max98373.c +++ b/sound/soc/codecs/max98373.c | |||
@@ -960,11 +960,11 @@ static int max98373_i2c_probe(struct i2c_client *i2c, | |||
960 | 960 | ||
961 | /* Power on device */ | 961 | /* Power on device */ |
962 | if (gpio_is_valid(max98373->reset_gpio)) { | 962 | if (gpio_is_valid(max98373->reset_gpio)) { |
963 | ret = gpio_request(max98373->reset_gpio, "MAX98373_RESET"); | 963 | ret = devm_gpio_request(&i2c->dev, max98373->reset_gpio, |
964 | "MAX98373_RESET"); | ||
964 | if (ret) { | 965 | if (ret) { |
965 | dev_err(&i2c->dev, "%s: Failed to request gpio %d\n", | 966 | dev_err(&i2c->dev, "%s: Failed to request gpio %d\n", |
966 | __func__, max98373->reset_gpio); | 967 | __func__, max98373->reset_gpio); |
967 | gpio_free(max98373->reset_gpio); | ||
968 | return -EINVAL; | 968 | return -EINVAL; |
969 | } | 969 | } |
970 | gpio_direction_output(max98373->reset_gpio, 0); | 970 | gpio_direction_output(max98373->reset_gpio, 0); |