From patchwork Thu Jun 15 16:31:54 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stanimir Varbanov X-Patchwork-Id: 105672 Delivered-To: patch@linaro.org Received: by 10.140.91.77 with SMTP id y71csp888638qgd; Thu, 15 Jun 2017 09:34:13 -0700 (PDT) X-Received: by 10.98.28.74 with SMTP id c71mr6209864pfc.154.1497544453403; Thu, 15 Jun 2017 09:34:13 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1497544453; cv=none; d=google.com; s=arc-20160816; b=XMlu8goKKKF2hZusrMyPUzjTTMY5KunB3KXlDs2AfOXgnHcYEB+3dK501zkrIkSGr5 xL+Klf6ixVnEB+eJYF58ZuTOxVX+5eVr3H2NGH8r6ID64HtHeF76bsHZMwdfe1JQ3eef NLAlueoycKh7wt+qAn/2RJY1wMacHU9C2CKFPFg54KJe3D5q6cAxPDduhQ3QT0QwxNNT GqKht4PdpIXW4Y2RoPtsHcC3the1wrkRziaiUploIyyfUd/JTOVicAJUx86VYVIWiBjj sfPludQicDz+bDyZGBT+rJ2Yiio7ySNybJYQj1ml45b17vuQJ92a4HjmK6p+cIhOPYuA Fk5w== 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=uPcaGgjANioWUEih1p4vaKoW4bUNNlKcJyxGCMBcxNfAJiv0GxOaDpFue+nVoZv1IE LqJwB5VhUZzkH7T5XGGFacIQqwVgJeQ6pHt7BIf6Rp2usUAdsF2wQ0yPdCZzVoWRJRg1 VJt1WVZCpXwg1wv2SbaGxlR/AlsTRDpV+a0IBsTDd3PUZkpsycm5BD6CZD/f6M7lOSfp 7zJUF0tnG8AbF5bkrNu9MbfQtlS4H7XHmeeM3pXJ/SQsEVhGpcyJV03RK7v1O2YBUTmN FROcE5/JnxT+XCJE3U5MQb7OBDf/iqATpXeqjApdWHwVKMCv7oTC3EO7EvXLvy4/wLbE /kjQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.b=IZ8gTNRD; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 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. [209.132.180.67]) by mx.google.com with ESMTP id e5si405726pgk.85.2017.06.15.09.34.13; Thu, 15 Jun 2017 09:34:13 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-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 header.b=IZ8gTNRD; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 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 S1752762AbdFOQdt (ORCPT + 25 others); Thu, 15 Jun 2017 12:33:49 -0400 Received: from mail-wm0-f41.google.com ([74.125.82.41]:33743 "EHLO mail-wm0-f41.google.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1751829AbdFOQdq (ORCPT ); Thu, 15 Jun 2017 12:33:46 -0400 Received: by mail-wm0-f41.google.com with SMTP id m7so1048443wmg.0 for ; Thu, 15 Jun 2017 09:33:46 -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=IZ8gTNRDIEw9WloqHFNLpC5DSxfKrK7Ds8auiQOmRL1IYeXwsP4AG0GAyqjszmVNk8 CuQBXb30re4iiD4HqhdsefdaI5aeM9mqZC6SuTh8PPfsuIZYr52ZL+XQoP6lY/PKJ9Hx PvIeOjoBkOxV7fvalow0Egw2sAUo0YX8Q7Yco= 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=Bd9HvShQ+OqpLxwPn450EesFAttArZIKJrLWhwXUHhaotP+Iwb53oEWTS6+kpJIZw+ c/8ovIDEIyQ8qXnpiaK2Pvj2aO0u/yuHQ8AKhZns8F6l34w6zqwNHBXqRoQ9OYHln5Md Tsk5+vQtMHzpPW5EpVi4J1CfIS3039HutQKZVQ4YijZACQbL2qbQ1lgcPrtGCcqfsMc8 xCTiqsVkZXNcObXllue54ZG7qKWlIhDOIXDcU53cnJjnkBksgG/0UnZ3QHpsU1pSZ91D JQWTUeI1TA0E4dwp1AncOdkeCm0hgOG/P6e6AOyx48aRH7M0BXYH2ID7cyAw4rdDv4rt jDGw== X-Gm-Message-State: AKS2vOxVa0kwoyREkUZNi3ne/EU5CrIysTQuzUUWclYmLFa3MFM4yVKg 58BI6k8WnUvHx+3Y X-Received: by 10.28.74.218 with SMTP id n87mr4310657wmi.16.1497544392239; Thu, 15 Jun 2017 09:33:12 -0700 (PDT) Received: from mms-0440.qualcomm.mm-sol.com ([37.157.136.206]) by smtp.gmail.com with ESMTPSA id m73sm541890wmi.25.2017.06.15.09.33.11 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 15 Jun 2017 09:33:11 -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 v11 13/19] media: venus: hfi_venus: fix variable dereferenced before check Date: Thu, 15 Jun 2017 19:31:54 +0300 Message-Id: <1497544320-2269-14-git-send-email-stanimir.varbanov@linaro.org> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1497544320-2269-1-git-send-email-stanimir.varbanov@linaro.org> References: <1497544320-2269-1-git-send-email-stanimir.varbanov@linaro.org> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@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) {