-
Notifications
You must be signed in to change notification settings - Fork 8.2k
drivers: i2s_nrfx: Fix division by 0 in divider calculation #72844
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
Conversation
1ad5170 to
5293f61
Compare
5293f61 to
114cb85
Compare
drivers/i2s/i2s_nrfx.c
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since this constant value is only used locally, I'd rather use:
| #define MCKCONST 1048576 | |
| enum { MCKCONST = 1048576 }; |
#define looks a bit weird with such indentation (which is also off by one currently).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@barsok do you want to follow the suggestion above?
Skip cases which would result in division by 0 in clock calculation Signed-off-by: Bartosz Sokolski <[email protected]>
114cb85 to
81f72a8
Compare
Skip cases which would result in division by 0 in clock calculation
Fixes #70316