summaryrefslogtreecommitdiff
path: root/drivers/media/platform
diff options
context:
space:
mode:
authorStanimir Varbanov <stanimir.varbanov@linaro.org>2017-06-15 19:31:54 +0300
committerMauro Carvalho Chehab <mchehab@s-opensource.com>2017-06-20 14:53:40 +0300
commit4cb3548a87c4a3650ab9c4587abfcf5fe6fa7542 (patch)
treedab3a90c7cebd27a620340b6ecdff4b6fc7ec164 /drivers/media/platform
parent4ba59616879217a7659a6cf343284aecb9a65ec2 (diff)
downloadlinux-4cb3548a87c4a3650ab9c4587abfcf5fe6fa7542.tar.xz
[media] media: venus: hfi_venus: fix variable dereferenced before check
This fixes a warning found when building with gcc7: drivers/media/platform/qcom/venus/hfi_venus.c:998 venus_isr_thread() warn: variable dereferenced before check 'hdev' (see line 994) Signed-off-by: Stanimir Varbanov <stanimir.varbanov@linaro.org> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
Diffstat (limited to 'drivers/media/platform')
-rw-r--r--drivers/media/platform/qcom/venus/hfi_venus.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/media/platform/qcom/venus/hfi_venus.c b/drivers/media/platform/qcom/venus/hfi_venus.c
index ab209f3d9498..1caae8feaa36 100644
--- a/drivers/media/platform/qcom/venus/hfi_venus.c
+++ b/drivers/media/platform/qcom/venus/hfi_venus.c
@@ -991,13 +991,14 @@ static void venus_process_msg_sys_error(struct venus_hfi_device *hdev,
static irqreturn_t venus_isr_thread(struct venus_core *core)
{
struct venus_hfi_device *hdev = to_hfi_priv(core);
- const struct venus_resources *res = hdev->core->res;
+ const struct venus_resources *res;
void *pkt;
u32 msg_ret;
if (!hdev)
return IRQ_NONE;
+ res = hdev->core->res;
pkt = hdev->pkt_buf;
if (hdev->irq_status & WRAPPER_INTR_STATUS_A2HWD_MASK) {