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

drivers: led: is31fl3194.c fix uninitialized scalar variable #82679

Merged
merged 1 commit into from
Dec 11, 2024

Conversation

jilaypandya
Copy link
Contributor

in the switch case in the preceeding for loop if default path is taken all the time, then the ret variable will stay uninitialized, the original contributor of this driver has provided a comment that this path shall never be reached, however, it is better to return an error code instead of continuing with an incorrect configuration, hence this commit replaces continue with a proper return errono.

@zephyrbot zephyrbot added size: XS A PR changing only a single line of code area: LED Label to identify LED subsystem labels Dec 7, 2024
Copy link
Collaborator

@simonguinot simonguinot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hello @jilaypandya. Thanks for this patch. Can you please fix the errono typo at the end of the commit message ?

in the switch case in the preceeding for loop if default path is taken
all the time, then the ret variable will stay uninitialized, the original
contributor of this driver has provided a comment that this path shall
never be reached, however, it is better to return an error code instead
of continuing with an incorrect configuration, hence this commit replaces
continue with a proper return errno.

Signed-off-by: Jilay Pandya <[email protected]>
Copy link
Collaborator

@simonguinot simonguinot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks !

@kartben kartben merged commit db43d2c into zephyrproject-rtos:main Dec 11, 2024
24 checks passed
@jilaypandya jilaypandya deleted the fix/434604 branch December 19, 2024 20:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: LED Label to identify LED subsystem size: XS A PR changing only a single line of code
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Coverity CID: 434604] Uninitialized scalar variable in drivers/led/is31fl3194.c
6 participants