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

[Backport v3.7-branch] icm42688: Fix divide by zero potential #76367

Merged
merged 1 commit into from
Aug 6, 2024

Conversation

zephyrbot
Copy link
Collaborator

@zephyrbot zephyrbot commented Jul 27, 2024

Backport 5474b61 from #75970.

Fixes #75256
Fixes #75257

There were code paths that could have lead to divide by zero given an
invalid scale setting for accel or gyro. In practice this should be an
invalid setup even before getting to these conversion functions. The
conversion functions now better show all valid values are accounted for
by using CODE_UNREACHABLE in the default case.

Signed-off-by: Tom Burdick <[email protected]>
(cherry picked from commit 5474b61)
@nashif nashif merged commit 79b78b8 into v3.7-branch Aug 6, 2024
27 checks passed
@nashif nashif deleted the backport-75970-to-v3.7-branch branch August 6, 2024 16:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: Sensors Sensors Backport Backport PR and backport failure issues
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

5 participants