Skip to content

[Coverity CID :189743]Incorrect expression in /drivers/usb/device/usb_dc_sam.c #11480

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

Closed
mandarcthorat1 opened this issue Nov 19, 2018 · 2 comments
Assignees
Labels
area: Drivers bug The issue is a bug, or the PR is fixing a bug Coverity A Coverity detected issue or its fix priority: medium Medium impact/importance bug

Comments

@mandarcthorat1
Copy link
Contributor

Static code scan issues seen in File: /drivers/usb/device/usb_dc_sam.c
Category: Incorrect expression
Function: usb_dc_attach
Component: Drivers
CID: 189743
Please fix or provide comments to square it off in coverity in the link: https://scan9.coverity.com/reports.htm#v32951/p12996

@mandarcthorat1 mandarcthorat1 added area: Drivers bug The issue is a bug, or the PR is fixing a bug Coverity A Coverity detected issue or its fix labels Nov 19, 2018
@aurel32
Copy link
Collaborator

aurel32 commented Nov 19, 2018

This is a false positive from Coverity. It assumes the DT_USBHS_MAXIMUM_SPEED is constant, while it comes from the device tree and therefore can take different values.

@galak galak added the priority: medium Medium impact/importance bug label Nov 21, 2018
@galak galak closed this as completed Nov 21, 2018
@galak
Copy link
Collaborator

galak commented Nov 21, 2018

Agree with @aurel32 assessment, this is intentional because of Device Tree.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: Drivers bug The issue is a bug, or the PR is fixing a bug Coverity A Coverity detected issue or its fix priority: medium Medium impact/importance bug
Projects
None yet
Development

No branches or pull requests

3 participants