Messages in this thread |  | | Date | Mon, 13 Apr 2026 10:27:06 +0300 | | From | Dan Carpenter <> | | Subject | Re: [PATCH 1/2] staging: media: tegra-video: fix wrong return type in tegra_get_format_fourcc_by_idx() |
| |
On Sat, Apr 11, 2026 at 11:10:04PM +0200, Alexandru Hossu wrote: > The function is declared to return u32, but returns -EINVAL on the error > path. Due to implicit conversion, -EINVAL (-22) becomes 0xFFFFFFEA as u32, > which is an invalid V4L2 pixel format value. > > The caller tegra_channel_enum_format() assigns this garbage value directly > to f->pixelformat and returns 0 (success) to userspace via VIDIOC_ENUM_FMT, > giving applications a silently wrong format descriptor instead of an error. > > Fix this by changing the return type to int and propagating the error > correctly in the caller. > > Signed-off-by: Alexandru Hossu <hossu.alexandru@gmail.com> > ---
Do you think you could analyse this to see if it's a real bug or not. If it is then give it a Fixes tag.
regards, dan carpenter
|  |