lpadc: a bug fix for the drivers/adc_mcux_lpadc.c

it need to be a && between two condition, to satisfy
the comment: only 12 / 13 bit resolution is supported,
if FSL_FEATURE_LPADC_HAS_CMDL_MODE is not defined. not
using ||.

Signed-off-by: Crist Xu <crist.xu@nxp.com>
This commit is contained in:
Crist Xu 2021-06-21 22:17:53 +08:00 committed by Maureen Helm
commit 530db5154e

View file

@ -106,7 +106,7 @@ static int mcux_lpadc_start_read(const struct device *dev,
#else
/* If FSL_FEATURE_LPADC_HAS_CMDL_MODE is not defined
only 12/13 bit resolution is supported. */
if (sequence->resolution != 12 || sequence->resolution != 13) {
if (sequence->resolution != 12 && sequence->resolution != 13) {
LOG_ERR("Unsupported resolution %d", sequence->resolution);
return -ENOTSUP;
}