Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Coverity CID :208914] Self assignment in drivers/peci/peci_mchp_xec.c #23586

Closed
zephyrbot opened this issue Mar 18, 2020 · 0 comments · Fixed by #23690 or #23701
Closed

[Coverity CID :208914] Self assignment in drivers/peci/peci_mchp_xec.c #23586

zephyrbot opened this issue Mar 18, 2020 · 0 comments · Fixed by #23690 or #23701
Assignees
Labels
bug The issue is a bug, or the PR is fixing a bug Coverity A Coverity detected issue or its fix priority: low Low impact/importance bug

Comments

@zephyrbot
Copy link
Collaborator

Static code scan issues found in file:

https://github.com/zephyrproject-rtos/zephyr/tree/master/drivers/peci/peci_mchp_xec.c#L280

Category: Incorrect expression
Function: peci_xec_transfer
Component: Drivers
CID: 208914

Details:

274             }
275    
276             if (base->ERROR & MCHP_PECI_ERR_BERR) {
277                 LOG_WRN("Write buffer is not empty\n");
278             }
279    
>>>     CID 208914:  Incorrect expression  (NO_EFFECT)
>>>     Assigning "base->ERROR" to itself has no effect.
280             base->ERROR = base->ERROR;
281             LOG_WRN("Transaction error %x\n", base->ERROR);
282             return -EIO;
283         }
284    
285         return 0;

Please fix or provide comments in coverity using the link:

https://scan9.coverity.com/reports.htm#v32951/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.

@zephyrbot zephyrbot added bug The issue is a bug, or the PR is fixing a bug Coverity A Coverity detected issue or its fix priority: low Low impact/importance bug labels Mar 18, 2020
nashif added a commit to nashif/zephyr that referenced this issue Mar 23, 2020
Assigning "base->ERROR" to itself has no effect.

Fixes zephyrproject-rtos#23586

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
nashif added a commit that referenced this issue Mar 23, 2020
Assigning "base->ERROR" to itself has no effect.

Fixes #23586

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
hakehuang pushed a commit to hakehuang/zephyr that referenced this issue Apr 30, 2020
Assigning "base->ERROR" to itself has no effect.

Fixes zephyrproject-rtos#23586

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug The issue is a bug, or the PR is fixing a bug Coverity A Coverity detected issue or its fix priority: low Low impact/importance bug
Projects
None yet
4 participants