From patchwork Mon Jun 12 16:27:50 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stanimir Varbanov X-Patchwork-Id: 103662 Delivered-To: patch@linaro.org Received: by 10.182.29.35 with SMTP id g3csp78022obh; Mon, 12 Jun 2017 09:32:05 -0700 (PDT) X-Received: by 10.99.184.25 with SMTP id p25mr54759608pge.22.1497285125885; Mon, 12 Jun 2017 09:32:05 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1497285125; cv=none; d=google.com; s=arc-20160816; b=s3P5KG/UrVNN6gbeMeXi0Tppfekp9ERxp7NHeUhqq7BQEhilbjyfHiwwn48AYLOuVl ikoxAskbq8Q50edn/+vY/EKjfOpaqpnqJ+vQih8y3Ome4rPIZhnmMedrMyOc8LUeVy4w e/rSgOU+VLYg9vL3C2Wp8ong+USolEMXGwpetTuG31Pg7T06u5Cwo4B5D6q3V9fSn+VD oz8rjdP2SM/F6gEXLcwBhOLDcFBPYh1J7270LV4T8FCIAwKnEF6XCqfp2qOumXM3SWTN 04W5w4vd/1lYCF0BgqohRxOAv3WJthwDGx/+mg78LjHQgFPnQG7/ZA9uKMwB0z4X+IGC tSUg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:dkim-signature:arc-authentication-results; bh=rJ57mFkuiS0ZytTOFrfKVE89r/uJoNQNnEvXpV7PPkg=; b=OdecV3ZyXD+H5pNdVOPBShD4XnsEm6a+ycKZYAObQtg0IRedWsvIZ0EzoeocgfVA+H JakJ7c3ou0HfEbdJDogfba6GDaaqAC2bK9pRS3m5WZ1hkAM1USqMV2nuYcsy8/LniyV1 tV6GOrHpR1sakPX0EgbH97hrhAAINTHVIYo54IzXxmx/VTn920s2TBXRk5oS73iUOco4 sM1vWCu+oT3iUDX4jW00ax4Ikn8YcZRvqIsizN076AwBHMbSlP/7teVLMSVPqRbA40jG HaBBLyYSAAQmtrbszeCor7/8tIqsCmUVjv3SW+f0wZam5UV7Baunssnxmdosf0sCaGpr X6Yw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org; spf=pass (google.com: best guess record for domain of linux-media-owner@vger.kernel.org designates 209.132.180.67 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. [209.132.180.67]) by mx.google.com with ESMTP id a5si7272168pfb.227.2017.06.12.09.32.05; Mon, 12 Jun 2017 09:32:05 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-media-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org; spf=pass (google.com: best guess record for domain of linux-media-owner@vger.kernel.org designates 209.132.180.67 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 S1754837AbdFLQcD (ORCPT + 4 others); Mon, 12 Jun 2017 12:32:03 -0400 Received: from mail-wr0-f169.google.com ([209.85.128.169]:33930 "EHLO mail-wr0-f169.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754409AbdFLQaB (ORCPT ); Mon, 12 Jun 2017 12:30:01 -0400 Received: by mail-wr0-f169.google.com with SMTP id g76so101843906wrd.1 for ; Mon, 12 Jun 2017 09:30:00 -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:in-reply-to:references; bh=rJ57mFkuiS0ZytTOFrfKVE89r/uJoNQNnEvXpV7PPkg=; b=aC8f7nvzGgOT5IwzN6wNYoUPX8C2N3SeXIBD9EyTKdSs6CfQLnWyJrqFp5X9OcjVFQ v3HAyKIAifEze5JOGm+djbQR32/CkspKVTXlXzQ/PUdyo8hY8LUQhXits55B8Iupscmb AHulCpw4VqwGCqjsD3O42mBpmwpq1+ttHQMTc= 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:in-reply-to :references; bh=rJ57mFkuiS0ZytTOFrfKVE89r/uJoNQNnEvXpV7PPkg=; b=AQFOMvy2nXSEXm5kMTzGoxCkxU22/HaLndbF5aJ0GiDbawqHDZV/FW1u7YXTgAFTW+ 4AmwtocLX6uE3OIdF2z9wmdzPEX4NY03ydbYpWlBxXLV6k6LBE6R/BqAG7ZVpfZeMfGN /UBezZNa3g0yRjckVQzX05aeBZyBZNLpZ67reniRiKZtk7Mpx+nBYZgTererOnPHmxWU dkU1ng4eqUCOC4pfWPI0FkIHavfw9j1S0AlF+kpF+8kcAKpvArmepmXnIDYlqWTXyKx3 s4cLs4QIVuYmvQmZLbrGgopXaVZCISIMSJPvKFUqvusV+mMY/vPvhmBvex2F8vdSBwze sQ6w== X-Gm-Message-State: AODbwcCvooIEXEbQ+vJ+oo7wHxYU2JwW+GLlUIeI5cvU+AsjrOTf5IlS oUaBmd10StWgoMmO X-Received: by 10.223.144.134 with SMTP id i6mr8783624wri.92.1497284993540; Mon, 12 Jun 2017 09:29:53 -0700 (PDT) Received: from mms-0440.qualcomm.mm-sol.com ([37.157.136.206]) by smtp.gmail.com with ESMTPSA id 49sm14493531wrz.8.2017.06.12.09.29.52 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 12 Jun 2017 09:29:52 -0700 (PDT) From: Stanimir Varbanov To: Mauro Carvalho Chehab , Hans Verkuil Cc: linux-media@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-msm@vger.kernel.org, Stanimir Varbanov Subject: [PATCH v10 13/18] media: venus: hfi_venus: fix variable dereferenced before check Date: Mon, 12 Jun 2017 19:27:50 +0300 Message-Id: <1497284875-19999-14-git-send-email-stanimir.varbanov@linaro.org> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1497284875-19999-1-git-send-email-stanimir.varbanov@linaro.org> References: <1497284875-19999-1-git-send-email-stanimir.varbanov@linaro.org> Sender: linux-media-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org 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 --- drivers/media/platform/qcom/venus/hfi_venus.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) -- 2.7.4 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) {