From patchwork Mon Nov 22 08:45:34 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: axel lin X-Patchwork-Id: 347131 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 oAM8eagZ018627 for ; Mon, 22 Nov 2010 08:40:38 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751541Ab0KVIkg (ORCPT ); Mon, 22 Nov 2010 03:40:36 -0500 Received: from mail-yx0-f174.google.com ([209.85.213.174]:46653 "EHLO mail-yx0-f174.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750953Ab0KVIkf (ORCPT ); Mon, 22 Nov 2010 03:40:35 -0500 Received: by yxf34 with SMTP id 34so3886156yxf.19 for ; Mon, 22 Nov 2010 00:40:35 -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=8fuf0fWJ1Irqu0MgOMdKtxTp/fg2CkColDl4LA+Zi2g=; b=NnuCcN0YdiXaI5z+699DLl69nCDJRqe8hfJ3BI2iOquWbugmJ77hia7tA/FGgQCB48 LLl3/qdTt8nwaNOxAzEw9nUk7cS5B82bBWaNQw95eOPWhN8TS0796Ox8DVp6zQR1HYVp WN3R7U6XLFWj2N5ioxJcDuxVZ9d5Aeu/zjvqM= 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=gzQj237e1hm0AFJBzaG+2MiSI4K+YLe94lk6oAxM/75k3Q/31uAvZcRvV2ndGsC+qH thXBGspNtVi1nNjsK849dTncP8jrqN99fS2MlYd5tnShRpukq/Qat8W9Z3a0mqX6g8on 8PFxBspYJ0up96tZc0sejh26YAK8jR62d5wM0= Received: by 10.100.107.20 with SMTP id f20mr3786845anc.91.1290415234950; Mon, 22 Nov 2010 00:40:34 -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 g29sm3463472anh.36.2010.11.22.00.40.32 (version=SSLv3 cipher=RC4-MD5); Mon, 22 Nov 2010 00:40:34 -0800 (PST) Subject: [PATCH 2/4] [ARM] mvsdio: fix a memory leak From: Axel Lin To: linux-kernel Cc: Nicolas Pitre , Chris Ball , linux-mmc@vger.kernel.org In-Reply-To: <1290415467.5471.7.camel@mola> References: <1290415359.5471.4.camel@mola> <1290415467.5471.7.camel@mola> Date: Mon, 22 Nov 2010 16:45:34 +0800 Message-Id: <1290415534.5471.8.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:40:41 +0000 (UTC) diff --git a/drivers/mmc/host/mvsdio.c b/drivers/mmc/host/mvsdio.c index a5bf60e..6a29972 100644 --- a/drivers/mmc/host/mvsdio.c +++ b/drivers/mmc/host/mvsdio.c @@ -825,7 +825,7 @@ out: iounmap(host->base); } if (r) - release_resource(r); + release_mem_region(r->start, SZ_1K); if (mmc) mmc_free_host(mmc); @@ -850,7 +850,7 @@ static int __exit mvsd_remove(struct platform_device *pdev) del_timer_sync(&host->timer); mvsd_power_down(host); iounmap(host->base); - release_resource(host->res); + release_mem_region(host->res->start, SZ_1K); mmc_free_host(mmc); } platform_set_drvdata(pdev, NULL);