Skip to content

drivers: sensor: icp101xx: remove logically dead code #90730

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

Merged
merged 1 commit into from
May 28, 2025

Conversation

kartben
Copy link
Collaborator

@kartben kartben commented May 28, 2025

Removed a logically dead else by doing sensor channel check
in a way that's more aligned with how other drivers do it.

Fixes: CID 505949
Fixes: #90558

@kartben kartben added Coverity A Coverity detected issue or its fix Trivial Changes that can be reviewed by anyone, i.e. doc changes, minor build system tweaks, etc. labels May 28, 2025
@github-actions github-actions bot added the area: Sensors Sensors label May 28, 2025
Removed a logically dead else by doing sensor channel check
in a way that's more aligned with how other drivers do it.

Fixes: CID 505949
Fixes: zephyrproject-rtos#90558
Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
Copy link

@nashif
Copy link
Member

nashif commented May 28, 2025

dead else

?

@kartben
Copy link
Collaborator Author

kartben commented May 28, 2025

dead else

?

Had updated the commit message but not the PR message, sorry.
The last "else" was (rightfully) being flagged as being dead by coverity. I had initially removed it, but then Sonaqloud complained I had no default else 😄 so ended up going for the approach that most sensor drivers seem to follow.

@kartben kartben merged commit fdf713a into zephyrproject-rtos:main May 28, 2025
29 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: Sensors Sensors Coverity A Coverity detected issue or its fix Trivial Changes that can be reviewed by anyone, i.e. doc changes, minor build system tweaks, etc.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Coverity CID: 505949] Logically dead code in drivers/sensor/tdk/icp101xx/icp101xx_drv.c
6 participants