diff options
author | Colin Ian King <colin.king@canonical.com> | 2021-01-15 13:11:26 +0300 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab+huawei@kernel.org> | 2021-01-27 18:17:29 +0300 |
commit | c5b14df7a80acadbbd184808dc3f519fbb2ab96c (patch) | |
tree | afe6ce70a7798c28d1d23330b567dfae9c6a1329 /drivers/media/platform | |
parent | b08797d1b2ec25165768c841a2ac484fecd72be1 (diff) | |
download | linux-c5b14df7a80acadbbd184808dc3f519fbb2ab96c.tar.xz |
media: venus: Fix uninitialized variable count being checked for zero
In the case where plat->codecs is NULL the variable count is uninitialized
but is being checked to see if it is 0. Fix this by initializing
count to 0.
Addresses-Coverity: ("Uninitialized scalar variable")
Fixes: e29929266be1 ("media: venus: Get codecs and capabilities from hfi platform")
Signed-off-by: Colin Ian King <colin.king@canonical.com>
Signed-off-by: Stanimir Varbanov <stanimir.varbanov@linaro.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
Diffstat (limited to 'drivers/media/platform')
-rw-r--r-- | drivers/media/platform/qcom/venus/hfi_parser.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/media/platform/qcom/venus/hfi_parser.c b/drivers/media/platform/qcom/venus/hfi_parser.c index 2c63988cb321..7263c0c32695 100644 --- a/drivers/media/platform/qcom/venus/hfi_parser.c +++ b/drivers/media/platform/qcom/venus/hfi_parser.c @@ -232,7 +232,7 @@ static int hfi_platform_parser(struct venus_core *core, struct venus_inst *inst) { const struct hfi_platform *plat; const struct hfi_plat_caps *caps = NULL; - u32 enc_codecs, dec_codecs, count; + u32 enc_codecs, dec_codecs, count = 0; unsigned int entries; if (inst) |