Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

ALSA: hda/tegra: Clean up runtime PM with guard()

Use guard(pm_runtime_active) for replacing the manual calls of
pm_runtime_get_sync() and pm_runtime_put().

Merely code cleanups and no functional changes.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Link: https://patch.msgid.link/20251216141154.172218-5-tiwai@suse.de

+5 -9
+5 -9
sound/hda/controllers/tegra.c
··· 592 592 struct platform_device *pdev = to_platform_device(hda->dev); 593 593 int err; 594 594 595 - pm_runtime_get_sync(hda->dev); 595 + guard(pm_runtime_active)(hda->dev); 596 596 err = hda_tegra_first_init(chip, pdev); 597 597 if (err < 0) 598 - goto out_free; 598 + return; 599 599 600 600 /* create codec instances */ 601 601 err = azx_probe_codecs(chip, 8); 602 602 if (err < 0) 603 - goto out_free; 603 + return; 604 604 605 605 err = azx_codec_configure(chip); 606 606 if (err < 0) 607 - goto out_free; 607 + return; 608 608 609 609 err = snd_card_register(chip->card); 610 610 if (err < 0) 611 - goto out_free; 611 + return; 612 612 613 613 chip->running = 1; 614 614 snd_hda_set_power_save(&chip->bus, power_save * 1000); 615 - 616 - out_free: 617 - pm_runtime_put(hda->dev); 618 - return; /* no error return from async probe */ 619 615 } 620 616 621 617 static void hda_tegra_remove(struct platform_device *pdev)