Skip to content

drivers: video: fix uninitialized struct in ov2640_init() #92151

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
Jun 27, 2025

Conversation

moonlight83340
Copy link
Contributor

Zero-initialize fmt to fix Coverity.

CID: 524780

Fix #90472

@moonlight83340 moonlight83340 marked this pull request as ready for review June 25, 2025 07:43
@github-actions github-actions bot added the area: Video Video subsystem label Jun 25, 2025
Copy link
Collaborator

@ngphibang ngphibang left a comment

Choose a reason for hiding this comment

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

LGTM. Thanks !

Copy link
Collaborator

@avolmat-st avolmat-st left a comment

Choose a reason for hiding this comment

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

Code LGTM.

Maybe just clarify a bit the commit log ? I missed that in the recent patch merged which does similar change on other drivers. This is no more Zero-initiialize since now video_format is initialized to the default format (only pitch variable is 0 initialized).

Would it be possible to just change this line of the commit log ?

@josuah
Copy link
Collaborator

josuah commented Jun 25, 2025

CI fails for now but seems infrastructure-related, not specific to this PR.
A force-push with the improved commit message will retrigger CI and should succeed.

Initialize fmt with default format and zero pitch to fix Coverity.

CID: 524780

Signed-off-by: Gaetan Perrot <[email protected]>
@moonlight83340
Copy link
Contributor Author

Does the new commit log make more sense ?

Copy link

Copy link
Collaborator

@avolmat-st avolmat-st left a comment

Choose a reason for hiding this comment

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

Thanks a lot for the update. Looks good to me.

@kartben kartben merged commit 5de04c6 into zephyrproject-rtos:main Jun 27, 2025
26 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: Video Video subsystem
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Coverity CID: 524780] Uninitialized scalar variable in drivers/video/ov2640.c
5 participants