From patchwork Fri Oct 23 09:02:52 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ashwin Chaugule X-Patchwork-Id: 7470941 X-Patchwork-Delegate: rjw@sisk.pl Return-Path: X-Original-To: patchwork-linux-acpi@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 5E1899F36A for ; Fri, 23 Oct 2015 09:03:04 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 7542F2044C for ; Fri, 23 Oct 2015 09:03:03 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 8D24F20738 for ; Fri, 23 Oct 2015 09:03:01 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752206AbbJWJDA (ORCPT ); Fri, 23 Oct 2015 05:03:00 -0400 Received: from mail-wi0-f180.google.com ([209.85.212.180]:33436 "EHLO mail-wi0-f180.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752022AbbJWJC7 (ORCPT ); Fri, 23 Oct 2015 05:02:59 -0400 Received: by wijp11 with SMTP id p11so67662029wij.0 for ; Fri, 23 Oct 2015 02:02:58 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro_org.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=iys8nEqDKwiszxNtYJfZ4pMl/jeHkZlone2GLc99uiI=; b=eX9IGUntZDbY5jzCxKUBp9UUrzh53eUuIDYInL2X4LUpOmysGnP9k8dgeeQP2j4N9T 5WAktx645srD5Lan4frIpw7wVLwlVblwhKnZQ95WzfLnGQ1ts3/vRjNhBU33Rx+fiklS QicL07d1neiA9nTFjiMU1VCNU2qPR7jY36h4czcwFVBkgb0Wj/bSSjbCyEbm8G7H09Ng p6mz8WhNFhtUZ0/Y9Qi5URYVs3izXeNgvWLLdk0uQgvrS7MFfOJhsu5Xy5hMZmB41YOY U1/lda5vJBrZXBKX9WQA793mgyVnj385uzCRDqu7XNwLNVogXtnuB5m9RaR6Gj5fSj6e Mwsg== 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:in-reply-to :references; bh=iys8nEqDKwiszxNtYJfZ4pMl/jeHkZlone2GLc99uiI=; b=LtyBxhucM4+Db/R8FAeRHdXgntOKo4VBeAs/PKSDqIzWfqxZVeOMjb5/Y1cXkbrQdL Icp56ALxINub8CeWLIL/MabsNZJyloHyFGr1Rx3jC2EhthAphq4vtUI75GHweIXaxKPe v5sjjzdiOhHNX7PL9HNwrhgAMXO2UZ/JkH+5A8yX6CqnfiJh2rPhk9xB3vfysobfpfdc PuyLPBOLjr1Na6fgijtw8DCb6/EsXgIoQvR8agINNct4bwK6h0oJgBNMoMZTPo9bgjrc NS3OUCImyjq6DkB/Im6HQO8Uyyaw/QaaSFebbNd1e7EUhCchCTm56Mk7mcYKIoa/l3cv p4NA== X-Gm-Message-State: ALoCoQlWmiUZwxz9Gkw/xHmc4+oSVHOfKXsJ1OOWvNFVpYIFPq0oT8MJ1Qv6mHyZ/YlnHzJPZeoL X-Received: by 10.180.198.142 with SMTP id jc14mr3191039wic.64.1445590978439; Fri, 23 Oct 2015 02:02:58 -0700 (PDT) Received: from esagroth.home (host109-146-133-72.range109-146.btcentralplus.com. [109.146.133.72]) by smtp.gmail.com with ESMTPSA id cr5sm20071778wjb.16.2015.10.23.02.02.57 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 23 Oct 2015 02:02:57 -0700 (PDT) From: Ashwin Chaugule To: rafael@kernel.org, dan.carpenter@oracle.com Cc: linux-acpi@vger.kernel.org, Ashwin Chaugule Subject: [PATCH] CPPC: Fix potential ptr leak Date: Fri, 23 Oct 2015 05:02:52 -0400 Message-Id: <1445590972-12331-1-git-send-email-ashwin.chaugule@linaro.org> X-Mailer: git-send-email 1.9.1 In-Reply-To: <20151022194928.GA24403@mwanda> References: <20151022194928.GA24403@mwanda> Sender: linux-acpi-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-acpi@vger.kernel.org X-Spam-Status: No, score=-3.8 required=5.0 tests=BAYES_00,BIGNUM_EMAILS, DKIM_SIGNED, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, T_DKIM_INVALID, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP The patch 337aadff8e45: "ACPI: Introduce CPU performance controls using CPPC" from Oct 2, 2015, leads to the following static checker warning: drivers/acpi/cppc_acpi.c:527 acpi_cppc_processor_probe() warn: overwrite may leak 'cpc_ptr' Fix warning by removing bogus per cpu ptr dereference. Reported-by: Dan Carpenter Signed-off-by: Ashwin Chaugule --- drivers/acpi/cppc_acpi.c | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/acpi/cppc_acpi.c b/drivers/acpi/cppc_acpi.c index 0bbf84b..8ca4c2c 100644 --- a/drivers/acpi/cppc_acpi.c +++ b/drivers/acpi/cppc_acpi.c @@ -524,7 +524,6 @@ int acpi_cppc_processor_probe(struct acpi_processor *pr) return 0; out_free: - cpc_ptr = per_cpu(cpc_desc_ptr, pr->id); kfree(cpc_ptr); out_buf_free: