ALSA: hda/tegra: Remove unnecessary null-check from hda_tegra_runtime_resume()
authorDmitry Osipenko <digetx@gmail.com>
Wed, 20 Jan 2021 00:31:51 +0000 (03:31 +0300)
committerTakashi Iwai <tiwai@suse.de>
Tue, 26 Jan 2021 06:32:46 +0000 (07:32 +0100)
The "chip" can't be NULL in hda_tegra_runtime_resume() because code would
crash otherwise. Let's remove the unnecessary check in order to clean up
code a tad.

Tested-by: Peter Geis <pgwipeout@gmail.com> # Ouya T30 audio works
Tested-by: Matt Merhar <mattmerhar@protonmail.com> # Ouya T30 boot-tested
Suggested-by: Thierry Reding <treding@nvidia.com>
Signed-off-by: Dmitry Osipenko <digetx@gmail.com>
Link: https://lore.kernel.org/r/20210120003154.26749-4-digetx@gmail.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>
sound/pci/hda/hda_tegra.c

index 04dcd4cdfd9ea37846d2fb056c48f16ec35401bf..6f2b743b9d75c777c202c583151f13e1b1d23b27 100644 (file)
@@ -178,7 +178,7 @@ static int __maybe_unused hda_tegra_runtime_resume(struct device *dev)
        rc = clk_bulk_prepare_enable(hda->nclocks, hda->clocks);
        if (rc != 0)
                return rc;
-       if (chip && chip->running) {
+       if (chip->running) {
                hda_tegra_init(hda);
                azx_init_chip(chip, 1);
                /* disable controller wake up event*/