Skip to content

Commit

Permalink
[media] media: venus: hfi_venus: fix variable dereferenced before check
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Stanimir Varbanov authored and Mauro Carvalho Chehab committed Jun 20, 2017
1 parent 4ba5961 commit 4cb3548
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion drivers/media/platform/qcom/venus/hfi_venus.c
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down

0 comments on commit 4cb3548

Please sign in to comment.