]> git.baikalelectronics.ru Git - kernel.git/commit
ALSA: hda: cs35l41: Call put_device() in the scope of get_device()
authorAndy Shevchenko <andriy.shevchenko@linux.intel.com>
Mon, 5 Sep 2022 16:58:25 +0000 (19:58 +0300)
committerTakashi Iwai <tiwai@suse.de>
Tue, 6 Sep 2022 12:00:43 +0000 (14:00 +0200)
commitc92c5965851b9c0c647d41fca924349575c3a947
treefebd88ca9fdbbeeb2c1d57bb2d13c52cb88c2a34
parent73312ca1c27c582d3a33a321a2c7dbb42725f792
ALSA: hda: cs35l41: Call put_device() in the scope of get_device()

When put_device() is called in another function it's hard to realize
that and easy to "fix" the code in a wrong way. Instead, move
put_device() to be in the same scope as get_device(), so we prevent
appearance of any attempts to "fix" the code.

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Link: https://lore.kernel.org/r/20220905165826.35979-1-andriy.shevchenko@linux.intel.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>
sound/pci/hda/cs35l41_hda.c