mirror of
https://github.com/torvalds/linux.git
synced 2026-05-25 15:41:52 +02:00
media: qcom: venus: Fix uninitialized variable warning
Avoid uninitialized variable when both V4L2_TYPE_IS_OUTPUT() and V4L2_TYPE_IS_CAPTURE() return false. Signed-off-by: Nas Chung <nas.chung@chipsnmedia.com> Signed-off-by: Sebastian Fricke <sebastian.fricke@collabora.com> Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
This commit is contained in:
parent
ad2698efce
commit
8e172e38a6
|
|
@ -154,14 +154,14 @@ find_format_by_index(struct venus_inst *inst, unsigned int index, u32 type)
|
|||
return NULL;
|
||||
|
||||
for (i = 0; i < size; i++) {
|
||||
bool valid;
|
||||
bool valid = false;
|
||||
|
||||
if (fmt[i].type != type)
|
||||
continue;
|
||||
|
||||
if (V4L2_TYPE_IS_OUTPUT(type)) {
|
||||
valid = venus_helper_check_codec(inst, fmt[i].pixfmt);
|
||||
} else if (V4L2_TYPE_IS_CAPTURE(type)) {
|
||||
} else {
|
||||
valid = venus_helper_check_format(inst, fmt[i].pixfmt);
|
||||
|
||||
if (fmt[i].pixfmt == V4L2_PIX_FMT_QC10C &&
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user