From patchwork Tue Jan 12 12:37:07 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Darren Jenkins X-Patchwork-Id: 72366 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter.kernel.org (8.14.3/8.14.2) with ESMTP id o0CCbIUj009645 for ; Tue, 12 Jan 2010 12:37:19 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752369Ab0ALMhR (ORCPT ); Tue, 12 Jan 2010 07:37:17 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1752264Ab0ALMhR (ORCPT ); Tue, 12 Jan 2010 07:37:17 -0500 Received: from mail-yx0-f187.google.com ([209.85.210.187]:38172 "EHLO mail-yx0-f187.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752266Ab0ALMhQ (ORCPT ); Tue, 12 Jan 2010 07:37:16 -0500 Received: by yxe17 with SMTP id 17so21283790yxe.33 for ; Tue, 12 Jan 2010 04:37:15 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:subject:from:to:cc :content-type:date:message-id:mime-version:x-mailer :content-transfer-encoding; bh=mWFpaKulEA8epqFTlb8mu7P1PIHOlI8jjt9qbQS8A3U=; b=E4WFPhBQ9ttPQnbKEmtKVZft+vCi36SQGKKys33wqFTzqfUZl0qvXZH5Niau841OuS Kazu4ziFeJyxaZE4x95YVeTPHNDNkW7QFwlH3fa3B19dXCp4jbkT8TsLzMIOFRxZ21Ob WLaJwAQAlpXPiOdoFDh0lH0u6WY6kT0rkFWj4= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=subject:from:to:cc:content-type:date:message-id:mime-version :x-mailer:content-transfer-encoding; b=FmsoHGUrXqwtOTKecTLuWbb6Ze8D/J7tFrzlxMv01iyYrX/HXe3NGYj8K7kiQx9rSx itUQxhYYmllWaU7wjHfMARB9ZiZfyIZPwA89gTHIriyqrA92Qfl1fvzytiDu+2k6rYkx NAB9ZDuG/hXdTRfJLsgbttzHW2zdklOmnqOsk= Received: by 10.150.7.19 with SMTP id 19mr13200804ybg.46.1263299831678; Tue, 12 Jan 2010 04:37:11 -0800 (PST) Received: from ?192.168.2.3? (C-61-68-170-117.bur.connect.net.au [61.68.170.117]) by mx.google.com with ESMTPS id 22sm10898245yxe.57.2010.01.12.04.37.08 (version=SSLv3 cipher=RC4-MD5); Tue, 12 Jan 2010 04:37:10 -0800 (PST) Subject: [PATCH] drivers/acpi/power_meter.c : remove double kfree() From: Darren Jenkins To: djwong@us.ibm.com, lenb@kernel.org, linux-acpi@vger.kernel.org, Kernel Janitors Cc: Linux Kernel Mailing List Date: Tue, 12 Jan 2010 23:37:07 +1100 Message-ID: <1263299827.4571.11.camel@ICE-BOX> Mime-Version: 1.0 X-Mailer: Evolution 2.28.1 Sender: linux-acpi-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-acpi@vger.kernel.org diff --git drivers/acpi/power_meter.c drivers/acpi/power_meter.c index 2ef7030..18ce00a 100644 --- drivers/acpi/power_meter.c +++ drivers/acpi/power_meter.c @@ -534,6 +534,7 @@ static void remove_domain_devices(struct acpi_power_meter_resource *resource) kfree(resource->domain_devices); kobject_put(resource->holders_dir); + resource->num_domain_devices = 0; } static int read_domain_devices(struct acpi_power_meter_resource *resource) @@ -740,7 +741,6 @@ skip_unsafe_cap: return res; error: - remove_domain_devices(resource); remove_attrs(resource); return res; }