提交 4cb3548a 编写于 作者: S Stanimir Varbanov 提交者: Mauro Carvalho Chehab

[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: NStanimir Varbanov <stanimir.varbanov@linaro.org>
Signed-off-by: NHans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: NMauro Carvalho Chehab <mchehab@s-opensource.com>
上级 4ba59616
...@@ -991,13 +991,14 @@ static void venus_process_msg_sys_error(struct venus_hfi_device *hdev, ...@@ -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) static irqreturn_t venus_isr_thread(struct venus_core *core)
{ {
struct venus_hfi_device *hdev = to_hfi_priv(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; void *pkt;
u32 msg_ret; u32 msg_ret;
if (!hdev) if (!hdev)
return IRQ_NONE; return IRQ_NONE;
res = hdev->core->res;
pkt = hdev->pkt_buf; pkt = hdev->pkt_buf;
if (hdev->irq_status & WRAPPER_INTR_STATUS_A2HWD_MASK) { if (hdev->irq_status & WRAPPER_INTR_STATUS_A2HWD_MASK) {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册