ASoC: meson: axg-tdm-formatter: free reset on device removal
authorJerome Brunet <jbrunet@baylibre.com>
Tue, 20 Aug 2019 12:34:13 +0000 (14:34 +0200)
committerMark Brown <broonie@kernel.org>
Tue, 20 Aug 2019 13:11:38 +0000 (14:11 +0100)
Use the devm variant to get the formatter reset so it is properly freed
on device removal

Fixes: 751bd5db5260 ("ASoC: meson: axg-tdm-formatter: add reset")
Signed-off-by: Jerome Brunet <jbrunet@baylibre.com>
Link: https://lore.kernel.org/r/20190820123413.22249-1-jbrunet@baylibre.com
Signed-off-by: Mark Brown <broonie@kernel.org>
sound/soc/meson/axg-tdm-formatter.c

index 2e498201139feb4711ca74ac89f6a89eeafa4789..1a0bf9d3836d45060b0949a64d222066c022b038 100644 (file)
@@ -327,7 +327,7 @@ int axg_tdm_formatter_probe(struct platform_device *pdev)
        }
 
        /* Formatter dedicated reset line */
-       formatter->reset = reset_control_get_optional_exclusive(dev, NULL);
+       formatter->reset = devm_reset_control_get_optional_exclusive(dev, NULL);
        if (IS_ERR(formatter->reset)) {
                ret = PTR_ERR(formatter->reset);
                if (ret != -EPROBE_DEFER)