diff options
author | Takashi Iwai | 2020-01-15 11:00:35 +0100 |
---|---|---|
committer | Takashi Iwai | 2020-01-16 17:29:17 +0100 |
commit | 2ba0176c709c103974cf55b6d373c4ea749c6391 (patch) | |
tree | 7ad0def740a156e30c9ffd2b9f147ad6ba67bdd7 /mm/percpu.c | |
parent | c249177944b650816069f6c49b769baaa94339dc (diff) |
ALSA: hda/analog - Minor optimization for SPDIF mux connections
AD HD-audio codec driver has a few code lines invoking
snd_get_num_conns() and using its return value as the array index
without checking. This is basically safe in all those places; at the
second and later calls snd_get_num_conns() returns the value cached
from the first invocation, hence the value is always consistent.
However, it looks a bit confusing as if a lack of the proper check.
This patch introduces a new field num_smux_conns in ad198x_spec for
simplifying the code. Now we store and refer to the value more
locally without invoking the extra function at each time.
Reported-by: Colin King <colin.king@canonical.com>
Link: https://lore.kernel.org/r/20200115100035.22511-1-tiwai@suse.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'mm/percpu.c')
0 files changed, 0 insertions, 0 deletions