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: NMatthias Kaehlcke <mka@chromium.org> Signed-off-by: NMark Brown <broonie@kernel.org>
Showing
想要评论请 注册 或 登录