From patchwork Mon Nov 22 08:46:36 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: axel lin X-Patchwork-Id: 347141 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter1.kernel.org (8.14.4/8.14.3) with ESMTP id oAM8fdvo019119 for ; Mon, 22 Nov 2010 08:41:40 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751329Ab0KVIli (ORCPT ); Mon, 22 Nov 2010 03:41:38 -0500 Received: from mail-gx0-f174.google.com ([209.85.161.174]:45964 "EHLO mail-gx0-f174.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751318Ab0KVIlh (ORCPT ); Mon, 22 Nov 2010 03:41:37 -0500 Received: by gxk23 with SMTP id 23so3888830gxk.19 for ; Mon, 22 Nov 2010 00:41:37 -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 :in-reply-to:references:content-type:date:message-id:mime-version :x-mailer:content-transfer-encoding; bh=W9i5w9mXVl/2pyu5T0BCwJ2dUSg/zdad/CdoVgYqsb0=; b=dcSgxaQwfazKhRH5oPK1oungdvLGIvAyppAjIFCsPptjDHdYaN8k4sYLV7WuF1drE3 aouuK4ORm77byLkpbBOzPLZsPu4O98lSZle4+vf1tUj3ZGzoaq897Yrd2kxmhZomqmtc W2i2p9jAiG87akVzMywnUyF3lnSnV78yoYwic= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=subject:from:to:cc:in-reply-to:references:content-type:date :message-id:mime-version:x-mailer:content-transfer-encoding; b=OjuoyYUOO3zU3c+eWGv4BYwdd0zwZFNreyglOgKm987frKgcN/Piy1qtNMi9j0qNg6 uM1bLbEopgd7so0SyOtkCok4c5WG8O/ec2w20zWszCOZqJ+OucMHr34vSd3+z+GDXLrs +V6RRyAd13wag4rMO60f7/kYBKAy4AETZBTxc= Received: by 10.90.15.14 with SMTP id 14mr6983577ago.3.1290415297047; Mon, 22 Nov 2010 00:41:37 -0800 (PST) Received: from [192.168.100.50] (60-251-136-127.HINET-IP.hinet.net [60.251.136.127]) by mx.google.com with ESMTPS id z70sm558204yhc.42.2010.11.22.00.41.34 (version=SSLv3 cipher=RC4-MD5); Mon, 22 Nov 2010 00:41:36 -0800 (PST) Subject: [PATCH 3/4] [ARM] pxamci: fix a memory leak From: Axel Lin To: linux-kernel Cc: Chris Ball , Andrew Morton , Eric Miao , linux-mmc@vger.kernel.org In-Reply-To: <1290415534.5471.8.camel@mola> References: <1290415359.5471.4.camel@mola> <1290415467.5471.7.camel@mola> <1290415534.5471.8.camel@mola> Date: Mon, 22 Nov 2010 16:46:36 +0800 Message-Id: <1290415596.5471.10.camel@mola> Mime-Version: 1.0 X-Mailer: Evolution 2.22.3.1 Sender: linux-mmc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-mmc@vger.kernel.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.3 (demeter1.kernel.org [140.211.167.41]); Mon, 22 Nov 2010 08:41:49 +0000 (UTC) diff --git a/drivers/mmc/host/pxamci.c b/drivers/mmc/host/pxamci.c index 7257738..d98e647 100644 --- a/drivers/mmc/host/pxamci.c +++ b/drivers/mmc/host/pxamci.c @@ -774,7 +774,7 @@ err_gpio_ro: } if (mmc) mmc_free_host(mmc); - release_resource(r); + release_mem_region(r->start, SZ_4K); return ret; } @@ -824,7 +824,7 @@ static int pxamci_remove(struct platform_device *pdev) clk_put(host->clk); - release_resource(host->res); + release_mem_region(host->res->start, SZ_4K); mmc_free_host(mmc); }