aboutsummaryrefslogtreecommitdiffstats
path: root/sound/core/pcm.c
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2019-01-13 09:25:42 +0100
committerTakashi Iwai <tiwai@suse.de>2019-01-21 16:38:15 +0100
commitd819fb21eecc70972c4a3681f2542e1ddcc1ca13 (patch)
tree4b06164a6a2ccf304d45b88b2f728d26afeecc0e /sound/core/pcm.c
parentLinux 5.0-rc1 (diff)
downloadlinux-dev-d819fb21eecc70972c4a3681f2542e1ddcc1ca13.tar.xz
linux-dev-d819fb21eecc70972c4a3681f2542e1ddcc1ca13.zip
ALSA: pcm: Call snd_card_unref() inside in_pcm_file()
The snd_card_unref() call in snd_pcm_link() looks suspicious through a quick glance, but it's a correct usage; this is needed just because the file descriptor check in is_pcm_file() calls the helper snd_lookup_minor_data() that keeps the card refcount. Despite of the correctness, the code still looks confusing. Basically, keeping the card ref for the whole code isn't needed as fdget() blocks the release of the opened file. Hence it's more understandable if snd_card_unref() is moved into is_pcm_file(), then the caller doesn't have to take care after the call. Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/core/pcm.c')
0 files changed, 0 insertions, 0 deletions