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: 55464 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-wi0-f198.google.com (mail-wi0-f198.google.com [209.85.212.198]) by patches.linaro.org (Postfix) with ESMTPS id 1739C20581 for ; Fri, 23 Oct 2015 09:03:04 +0000 (UTC) Received: by wiyb4 with SMTP id b4sf8086767wiy.2 for ; Fri, 23 Oct 2015 02:03:03 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:delivered-to:from:to:cc:subject :date:message-id:in-reply-to:references:sender:precedence:list-id :x-original-sender:x-original-authentication-results:mailing-list :list-post:list-help:list-archive:list-unsubscribe; bh=eXou7RHI5stpifhGltyjIPc5tOrGuS/VvDUEUZV21N0=; b=WdHPtQgkSqJAz3HyUnsBA9G9XhOKvTl9h3I4G4+gaQXlBKUzf4HxmwS17zQXDg0RHK 4q41Z0qzRPHTF/GfmwbBg0Pgc47tuKz28a5h47a8t5dP9V9DkiH68tnmWrjRQjwBSOaR FU6gB3DCNP7LvCXwGH4qkD/AcP8XV+WMReA3GFfk2lx2OCvVCCxd01OWUtmCuj11QT1+ ZssJ3yQDeF+BT7OL1B1ehUpk4ai/syfSOKdik7V8HxCmbg2gg9qigc7PMGZ47kHPb6Th yVrnX/CBg+lJFKjDj/MMMAuvbRX8fAXzA888rO9WBiZvIYuE7z/PvIcKs3rAg1H6+WsN bLhA== X-Gm-Message-State: ALoCoQkNqZwV8Bkh3o/0jHt9fRKRfzuykQf8PPavAYuexvppylgKadAV68v5DKcog1Vk9MozjJr6 X-Received: by 10.112.54.197 with SMTP id l5mr4632981lbp.21.1445590983317; Fri, 23 Oct 2015 02:03:03 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.25.38.201 with SMTP id m192ls370990lfm.55.gmail; Fri, 23 Oct 2015 02:03:03 -0700 (PDT) X-Received: by 10.112.210.129 with SMTP id mu1mr11045228lbc.68.1445590983170; Fri, 23 Oct 2015 02:03:03 -0700 (PDT) Received: from mail-lf0-x234.google.com (mail-lf0-x234.google.com. [2a00:1450:4010:c07::234]) by mx.google.com with ESMTPS id po10si12088774lbc.101.2015.10.23.02.03.03 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 23 Oct 2015 02:03:03 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 2a00:1450:4010:c07::234 as permitted sender) client-ip=2a00:1450:4010:c07::234; Received: by lfbn126 with SMTP id n126so41736821lfb.2 for ; Fri, 23 Oct 2015 02:03:03 -0700 (PDT) X-Received: by 10.112.139.201 with SMTP id ra9mr10690129lbb.29.1445590983015; Fri, 23 Oct 2015 02:03:03 -0700 (PDT) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patch@linaro.org Received: by 10.112.59.35 with SMTP id w3csp1083701lbq; Fri, 23 Oct 2015 02:03:02 -0700 (PDT) X-Received: by 10.50.61.243 with SMTP id t19mr2933152igr.22.1445590982100; Fri, 23 Oct 2015 02:03:02 -0700 (PDT) Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id i36si14706750ioo.118.2015.10.23.02.03.01; Fri, 23 Oct 2015 02:03:02 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-acpi-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752206AbbJWJDA (ORCPT + 6 others); 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) 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: list List-ID: X-Mailing-List: linux-acpi@vger.kernel.org X-Original-Sender: ashwin.chaugule@linaro.org X-Original-Authentication-Results: mx.google.com; spf=pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 2a00:1450:4010:c07::234 as permitted sender) smtp.mailfrom=patch+caf_=patchwork-forward=linaro.org@linaro.org; dkim=neutral (body hash did not verify) header.i=@linaro_org.20150623.gappssmtp.com Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org X-Google-Group-Id: 836684582541 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , 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: