Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Skip to content
Unverified Commit 35b84bf0 authored by Matthias Kaehlcke's avatar Matthias Kaehlcke Committed by Mark Brown
Browse files

ASoC: dmic: Fix check of return value from read of 'num-channels'



Commit 7fb59e94 ("ASoC: codecs: dmic: Make number of channels
 configurable") introduces an optional property to the device tree
to specify the number of DMIC channels. dmic_codec_probe() uses
of_property_read_u32() to read the DT value, and expects a return
value of -ENOENT when the property does not exist. This expectation
is incorrect, the actual value returned in this case is -EINVAL (see
of_find_property_value_of_size(), which is called under the hood).
Check for -EINVAL instead.

Fixes: 7fb59e94 ("ASoC: codecs: dmic: Make number of channels configurable")
Signed-off-by: default avatarMatthias Kaehlcke <mka@chromium.org>
Signed-off-by: default avatarMark Brown <broonie@kernel.org>
parent 7fb59e94
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment