From: Stanimir Varbanov <stanimir.varbanov@linaro.org>
To: linux-media@vger.kernel.org, linux-arm-msm@vger.kernel.org,
linux-kernel@vger.kernel.org
Cc: bryan.odonoghue@linaro.org,
Stanimir Varbanov <stanimir.varbanov@linaro.org>,
stable@vger.kernel.org
Subject: [PATCH 2/5] venus: hfi_parser: Check for instance after hfi platform get
Date: Mon, 8 Mar 2021 12:52:02 +0200 [thread overview]
Message-ID: <20210308105205.445148-3-stanimir.varbanov@linaro.org> (raw)
In-Reply-To: <20210308105205.445148-1-stanimir.varbanov@linaro.org>
The inst function argument is != NULL only for Venus v1 and
we did not migrate v1 to a hfi_platform abstraction yet. So
check for instance != NULL only after hfi_platform_get returns
no error.
Fixes: e29929266be1 ("media: venus: Get codecs and capabilities from hfi platform")
Cc: stable@vger.kernel.org # v5.12+
Signed-off-by: Stanimir Varbanov <stanimir.varbanov@linaro.org>
---
drivers/media/platform/qcom/venus/hfi_parser.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/drivers/media/platform/qcom/venus/hfi_parser.c b/drivers/media/platform/qcom/venus/hfi_parser.c
index ce230974761d..5b8389b98299 100644
--- a/drivers/media/platform/qcom/venus/hfi_parser.c
+++ b/drivers/media/platform/qcom/venus/hfi_parser.c
@@ -235,13 +235,13 @@ static int hfi_platform_parser(struct venus_core *core, struct venus_inst *inst)
u32 enc_codecs, dec_codecs, count = 0;
unsigned int entries;
- if (inst)
- return 0;
-
plat = hfi_platform_get(core->res->hfi_version);
if (!plat)
return -EINVAL;
+ if (inst)
+ return 0;
+
if (plat->codecs)
plat->codecs(&enc_codecs, &dec_codecs, &count);
--
2.25.1
next prev parent reply other threads:[~2021-03-08 10:53 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-03-08 10:52 [PATCH 0/5] Venus msm8916 fixes Stanimir Varbanov
2021-03-08 10:52 ` [PATCH 1/5] venus: hfi_parser: Don't initialize parser on v1 Stanimir Varbanov
2021-03-08 10:52 ` Stanimir Varbanov [this message]
2021-03-08 10:52 ` [PATCH 3/5] venus: pm_helpers: Set opp clock name for v1 Stanimir Varbanov
2021-03-08 10:52 ` [PATCH 4/5] venus: venc_ctrls: Change default header mode Stanimir Varbanov
2021-03-08 10:52 ` [PATCH 5/5] venus: hfi_cmds: Support plane-actual-info property from v1 Stanimir Varbanov
2021-03-09 20:55 ` [PATCH 0/5] Venus msm8916 fixes Bryan O'Donoghue
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20210308105205.445148-3-stanimir.varbanov@linaro.org \
--to=stanimir.varbanov@linaro.org \
--cc=bryan.odonoghue@linaro.org \
--cc=linux-arm-msm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-media@vger.kernel.org \
--cc=stable@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).