From patchwork Wed Apr 7 10:56:00 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stanimir Varbanov X-Patchwork-Id: 416677 Delivered-To: patch@linaro.org Received: by 2002:a02:8562:0:0:0:0:0 with SMTP id g89csp352745jai; Wed, 7 Apr 2021 03:56:11 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxbM+FPWpS4COWiJ0SvKn7rRm+D0kYg6DxXXEq18nDd05zOApFDTgjaHPf86gymZCkesVIi X-Received: by 2002:a17:906:8a5b:: with SMTP id gx27mr222224ejc.344.1617792971591; Wed, 07 Apr 2021 03:56:11 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1617792971; cv=none; d=google.com; s=arc-20160816; b=U3B179wWiej2GWxwTdtEwRKQNnA96nl3eCbOE5t+FyeJibPM+tKwoFrw/7PYiIuZId EM54DaWR5laCYIehkYdorKYJ3q5UdEIxXk9qsscj7uIAlmyhTQV92yEv3qxXVOMM6MPN Rhi6SC9PYrCWIe0niIwe83SpdmDsv7Cw4T1ygGeqFeHs1FvJUwHXV/lngtoutJ+L8O5r 5fw7iA/U6TR+nrjp5E45cqRKGXvvRc8ARvldn/XlYlAq+eMAK9ayUmlROMhTx5/9zM52 J8s6TkFkRagbdKK6rMh6N0Xk1BZuX7h+AilwE3+N9pIwkQ3JgN/8YtF3xFz/zy0N2P9K 5myA== 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=DMUoZ2Fv/JiQLeJ6+xxoSsBoRdnAijbj8JhCQRW/UilowhewNTBPJ/ICBway2tgx/A Q2mf8TzFOZBzUeKfptHg7+5qFR39RKUC+rfcW8NqT9Eltn1tOVUHxzDaLKNdOQyDtpUm 1LfJdfs9fbm35Kre/BOYupQTrTKwT2GlUHUNJZush8LarzLzSncV7hEot09uWhdpX85a 0ruc0b7CatC3wuMtRWg3bPJCSpcQmIIDrcTnrpTWSPfzBXIiW9GGPAuh3CHeoqY/Yvl8 bubHj55OYXjxtuotWqwrYNwMOCysyoOcjLlluxnSBI8ZzZpo1AQpgiGycCtddK4RpgJV PKng== 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-media-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-media-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 g14si6941845ejw.247.2021.04.07.03.56.11; Wed, 07 Apr 2021 03:56:11 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-media-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-media-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-media-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 S1351729AbhDGK4R (ORCPT + 3 others); Wed, 7 Apr 2021 06:56:17 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57418 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1351732AbhDGK4O (ORCPT ); Wed, 7 Apr 2021 06:56:14 -0400 Received: from mail-ej1-x62c.google.com (mail-ej1-x62c.google.com [IPv6:2a00:1450:4864:20::62c]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 39F9FC061761 for ; Wed, 7 Apr 2021 03:56:05 -0700 (PDT) Received: by mail-ej1-x62c.google.com with SMTP id qo10so16534839ejb.6 for ; Wed, 07 Apr 2021 03:56:05 -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=ululw17B4PsYCWMUMzSVvN+EjYZ2kZQq+VuwBuCbFva1SiH69kzxiwdKwHRkd4aAZq 2nVi+UDHqdkS8hxymoxAYZM1UigPfo+plo/VaxD9PJxfmgR67ZdXDQBMGJkyMTYDlrqJ 9+zKjNfyHTcghizjcbJQkl2RNW3dtHxgpBOpdTSaUSjn49AXSJISzovqevSTNSbrhItj 6VJxdjGzulwwjce1u+ZG+x7OP7GDQFcqnst7R0KtEr6mhwxuFhJCbpy3RWMp5Y9OamsV NnMXPjKfvYMGpUvBCpnrV258XyBeNycWpS1t8njM4RsiG3PML6mHfMIxLZaFB7zdLm5H oYZQ== X-Gm-Message-State: AOAM533YJC/jhhvfJHIkBlADqAhdLktTr+5dcuzOncXyD+Sq1vguWjNb WhDfjKqILscI7h2dwqTniZ9gdu768ZDTHaJQ 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 Precedence: bulk List-ID: X-Mailing-List: linux-media@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(-) -- 2.25.1 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 ||