From patchwork Wed Oct 12 16:39:27 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tai Nguyen X-Patchwork-Id: 9373573 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 556FB607FD for ; Wed, 12 Oct 2016 16:46:22 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 3B24B29515 for ; Wed, 12 Oct 2016 16:46:22 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 2F2F2296EF; Wed, 12 Oct 2016 16:46:22 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-4.1 required=2.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_MED,T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.9]) (using TLSv1.2 with cipher AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id B97AC29515 for ; Wed, 12 Oct 2016 16:46:21 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.85_2 #1 (Red Hat Linux)) id 1buMdb-0000AM-4M; Wed, 12 Oct 2016 16:44:15 +0000 Received: from mail-pa0-x230.google.com ([2607:f8b0:400e:c03::230]) by bombadil.infradead.org with esmtps (Exim 4.85_2 #1 (Red Hat Linux)) id 1buMdX-00008f-4u for linux-arm-kernel@lists.infradead.org; Wed, 12 Oct 2016 16:44:11 +0000 Received: by mail-pa0-x230.google.com with SMTP id ry6so29787376pac.3 for ; Wed, 12 Oct 2016 09:43:50 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=apm.com; s=apm; h=from:to:cc:subject:date:message-id; bh=iKSCEFDYOWotIocXZo51RsDmyLaU24am5/ie+bae0Fs=; b=Acya+0LuH6wx5sgjQ5JkaPToAwxAzyHeKm0zIOIZtp2HxrB0WVFlpwhzeMm2byN2Hc UI2FIgaGPzlKWQ9rcu3sZjcypc15TB+AHwcwzC/UiZRJNtHDcv8+LUY6Zsncz5D1QAia Y+i2Jbxa/01A+iW9XfZ5BnSLzpT9jOCBEdCSM= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=iKSCEFDYOWotIocXZo51RsDmyLaU24am5/ie+bae0Fs=; b=gtNV/Odwp52c+kmf0u8ieGolPA4PQ6xgjOh4y/MMveVY1T1jU+7KcP9EWHhr5mNO63 KZCHMMIsQXumbpZRGrUxzgQqRadutXcGuEdno9R17/KQIndbGjJFsZLMGK7mjKDaOfAB fbUWAfChQfqvUI/94Pa4xpwk8WfzJscrstSaLVVTMYaYr2vImp8Cl8XeLqJ2Pb9+qu2I LNqfXWhi1TmHDdOPLjX+PZLpCXG2neSXReBCH2HUKCBD+TLCPaIydgW5O2cqzGrvPNEG VDmLPw6NlV5UbfmKODbPcdeOo+yc4Cy3XowwPYqhHNp6gc+ev6MLztgB+xX6up7nvxZ4 LtpA== X-Gm-Message-State: AA6/9RmPxzmh7Fb410tSYkvsM4iBVHeD+OeDGyGvNePFTTo3QEOOQb/rNgXuECO7TnMHLgoB X-Received: by 10.66.5.169 with SMTP id t9mr2619436pat.169.1476290629989; Wed, 12 Oct 2016 09:43:49 -0700 (PDT) Received: from ttnguyen-Ubuntu.amcc.com ([206.80.4.98]) by smtp.gmail.com with ESMTPSA id o82sm12984935pfk.24.2016.10.12.09.43.49 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 12 Oct 2016 09:43:49 -0700 (PDT) From: Tai Nguyen To: mark.rutland@arm.com, dan.carpenter@oracle.com Subject: [PATCH] perf: xgene: Remove bogus IS_ERR() check Date: Wed, 12 Oct 2016 09:39:27 -0700 Message-Id: <1476290367-8092-1-git-send-email-ttnguyen@apm.com> X-Mailer: git-send-email 1.9.1 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20161012_094411_276092_FB41F8DF X-CRM114-Status: GOOD ( 12.18 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: linux-arm-kernel@lists.infradead.org, Tai Nguyen MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP This patch fixes the warning issue with static checker. The bug is reported in [1] [1] https://www.spinics.net/lists/arm-kernel/msg535957.html Signed-off-by: Tai Nguyen Acked-by: Mark Rutland --- drivers/perf/xgene_pmu.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/perf/xgene_pmu.c b/drivers/perf/xgene_pmu.c index c2ac764..a8ac4bc 100644 --- a/drivers/perf/xgene_pmu.c +++ b/drivers/perf/xgene_pmu.c @@ -1011,7 +1011,7 @@ xgene_pmu_dev_ctx *acpi_get_pmu_hw_inf(struct xgene_pmu *xgene_pmu, rc = acpi_dev_get_resources(adev, &resource_list, acpi_pmu_dev_add_resource, &res); acpi_dev_free_resource_list(&resource_list); - if (rc < 0 || IS_ERR(&res)) { + if (rc < 0) { dev_err(dev, "PMU type %d: No resource address found\n", type); goto err; }