-
Notifications
You must be signed in to change notification settings - Fork 8.3k
Labels
CoverityA Coverity detected issue or its fixA Coverity detected issue or its fixbugThe issue is a bug, or the PR is fixing a bugThe issue is a bug, or the PR is fixing a bugpriority: lowLow impact/importance bugLow impact/importance bug
Description
Static code scan issues found in file:
Category: Code maintainability issues
Function: lmp90xxx_adc_read_channel
Component: Drivers
CID: 236129
Details:
zephyr/drivers/adc/adc_lmp90xxx.c
Line 616 in 374629a
| err = lmp90xxx_read_reg8(dev, LMP90XXX_REG_ADC_DONE, |
610 delay = lmp90xxx_odr_delay_tbl[odr];
611 LOG_DBG("sleeping for %d ms", delay);
612 k_msleep(delay);
613
614 /* Poll for data ready */
615 do {
>>> CID 236129: Code maintainability issues (UNUSED_VALUE)
>>> Assigning value from "lmp90xxx_read_reg8(dev, 24, &adc_done)" to "err" here, but that stored value is overwritten before it can be used.
616 err = lmp90xxx_read_reg8(dev, LMP90XXX_REG_ADC_DONE,
617 &adc_done);
618 if (adc_done == 0xFFU) {
619 LOG_DBG("sleeping for 1 ms");
620 k_msleep(1);
621 } else {
Please fix or provide comments in coverity using the link:
https://scan9.coverity.com/reports.htm#v29271/p12996
Note: This issue was created automatically. Priority was set based on classification
of the file affected and the impact field in coverity. Assignees were set using the CODEOWNERS file.
Metadata
Metadata
Assignees
Labels
CoverityA Coverity detected issue or its fixA Coverity detected issue or its fixbugThe issue is a bug, or the PR is fixing a bugThe issue is a bug, or the PR is fixing a bugpriority: lowLow impact/importance bugLow impact/importance bug