Received: by 2002:a05:6a10:9848:0:0:0:0 with SMTP id x8csp875217pxf; Wed, 7 Apr 2021 13:53:54 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzUsUhrCak4tKvFhn7/yqN8Pg1lzxuTaX/vPzgdErU3Uo/itv0n3CwkI52Uuf/pyBgpoHyK X-Received: by 2002:a05:6402:254c:: with SMTP id l12mr6679385edb.119.1617828834099; Wed, 07 Apr 2021 13:53:54 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1617828834; cv=none; d=google.com; s=arc-20160816; b=mzxGDEimI/+biGv6rZQV4FSwzrTeSgvQfoHTwIxA2TQAkSfgnzR3hW4XYYOtL35JTh fRPgvjAZzmy9aTh5pFruOG3f0BUG2nKSPlLjbFth1g63Hcw2zqdV2dsEAMSI5Re2FpSQ z6DzedOZZb8N/5+LHah/2/jwnCR9cJK2K6LQf2/bnvcvu2OERmMJCELMZZxiDNNVBXO8 ygdJVwsjjAZyNub16w+9uvCslAs9BmIHLEdaYrLqtniPDlm60OLizHTBvWBrul8TYrB+ uwQas8ras2x8DXxlOBpED8Wmw3fObVFA9nfHhkdRbVxc7JjCgSn1dWnMkSZr9M9Ur2JQ eW1Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=QtzWXHJA+5FuG0p3JmasWDLoGcvseqdKJ8JMwmLlN90=; b=XBU/zSuNlLcl5t1/1zu8b+biXrYvRGqzHXUSALFMQ6uG6D5s5N97kKk6ZZhoTVD4tU 11S0o0uwrIpxGwFtkZBMj7Jz7XMVTpAUF/Z3lupNU5WQoUrMORu9BvR5xP48ESo5PbSI o1yb6WFNhIcEPFM3eIYgUDkB0tZok0bm6mrwHpNqts4/av9uUbNCYbQOWef9BTLaiXsl IcULwVxA4uDSLiHc73IbgCRfVPkG+dKWK+LK8sStQxn2/miAyB/lu+3AepzIBytZiV6j dk3HEEFYZKR8J7WoD8dS8+sXG1TX7Fc9Qoh9vJbPkkeDa6Y6AGe/3mNI2LL/dNwdmD4l W+Pg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="PtVtBI5/"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id x24si13753488edi.145.2021.04.07.13.53.31; Wed, 07 Apr 2021 13:53:54 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="PtVtBI5/"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S245237AbhDGK4R (ORCPT + 99 others); Wed, 7 Apr 2021 06:56:17 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57414 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S241663AbhDGK4P (ORCPT ); Wed, 7 Apr 2021 06:56:15 -0400 Received: from mail-ej1-x631.google.com (mail-ej1-x631.google.com [IPv6:2a00:1450:4864:20::631]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 08884C06175F for ; Wed, 7 Apr 2021 03:56:05 -0700 (PDT) Received: by mail-ej1-x631.google.com with SMTP id w3so26910474ejc.4 for ; Wed, 07 Apr 2021 03:56:04 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=QtzWXHJA+5FuG0p3JmasWDLoGcvseqdKJ8JMwmLlN90=; b=PtVtBI5/56xbKIWUAYox6l24X0F9X7Tr5o8krgPEl0bgccWxp6Ex6Uo8j68Te4RwNj Nsh7+O2mGSjjSB3gFyQpW+uHn2Dpu+mD/n9+aV8zA9ppzElfKQbzUXUXzZN9uzeafEtp /bAwdxscF2JVXnpqjVdPIULWTcKrJwfp1RPwWYsK817zbo8uOdfoyFSw0JrKmbMnHUvp 8fx6LZGm1MgPO0fvPSTsmxyMAtesXQX0/cShSTlNtalWIBzphR2uzg9YZAoVZlWCtqFh DJTsctFQCvrneV88lmE3Tuy7xr6mjSmEt+zDoVFpEiaQzCejgu7Mh6EPKooM09U0Rdyi H86g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=QtzWXHJA+5FuG0p3JmasWDLoGcvseqdKJ8JMwmLlN90=; b=WALSpNUWJ5yrfpijPpVQmiOPPmnSR3M8fmshEx76vY5bT/41cjNIWkthZxdJNGo639 DcghLDpsDvUIvpGDqVD0Ryxq5VBLwCCReUB9NJYox9AW9Wl5FnYrUq57rJ102wBWsTKN jcmpGbpO2VfqhDjS+vLSvednMUK1MnPTL7IjMTmsmrAssOEZqIKlqvl7XUM4wEsl4k/Q lu3q5xvDxd3WfXb8o0reegEefMYIO53GI51Aw27JSJ0co95CaXsWMJcq3uIfEPYKyaOo olb1+v797CrUKQvYzl1TRMYdgManyFYzHs7NeZt8df2tQ5dgBqcB1r7zwASzQkYw5S+x kWKg== X-Gm-Message-State: AOAM5309lw6NCf7aqW4gnwIWAPw0WVUwD2Tnnk2oRBEgUoL4jUBYf9Nb sDXPwMgon6clkfRASK2FuvBdug== X-Received: by 2002:a17:906:e0b:: with SMTP id l11mr3089773eji.111.1617792963805; Wed, 07 Apr 2021 03:56:03 -0700 (PDT) Received: from localhost.localdomain (hst-221-20.medicom.bg. [84.238.221.20]) by smtp.gmail.com with ESMTPSA id f9sm15400666eds.41.2021.04.07.03.56.03 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 07 Apr 2021 03:56:03 -0700 (PDT) From: Stanimir Varbanov To: linux-media@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-msm@vger.kernel.org Cc: Mauro Carvalho Chehab , Stanimir Varbanov Subject: [PATCH] venus: hfi_venus: Fix a warning in venus ISR Date: Wed, 7 Apr 2021 13:56:00 +0300 Message-Id: <20210407105600.348245-1-stanimir.varbanov@linaro.org> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Fix the following smatch warning: hfi_venus.c:1100 venus_isr() warn: variable dereferenced before check 'hdev' (see line 1097) Signed-off-by: Stanimir Varbanov --- drivers/media/platform/qcom/venus/hfi_venus.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/drivers/media/platform/qcom/venus/hfi_venus.c b/drivers/media/platform/qcom/venus/hfi_venus.c index cebb20cf371f..114fcb6ee9a0 100644 --- a/drivers/media/platform/qcom/venus/hfi_venus.c +++ b/drivers/media/platform/qcom/venus/hfi_venus.c @@ -1093,13 +1093,16 @@ static irqreturn_t venus_isr_thread(struct venus_core *core) static irqreturn_t venus_isr(struct venus_core *core) { struct venus_hfi_device *hdev = to_hfi_priv(core); + void __iomem *cpu_cs_base; + void __iomem *wrapper_base; u32 status; - void __iomem *cpu_cs_base = hdev->core->cpu_cs_base; - void __iomem *wrapper_base = hdev->core->wrapper_base; if (!hdev) return IRQ_NONE; + cpu_cs_base = hdev->core->cpu_cs_base; + wrapper_base = hdev->core->wrapper_base; + status = readl(wrapper_base + WRAPPER_INTR_STATUS); if (IS_V6(core)) { if (status & WRAPPER_INTR_STATUS_A2H_MASK || -- 2.25.1