[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <1502799694-669-1-git-send-email-vasilyev@ispras.ru>
Date: Tue, 15 Aug 2017 15:21:34 +0300
From: Anton Vasilyev <vasilyev@...ras.ru>
To: Boris Brezillon <boris.brezillon@...e-electrons.com>
Cc: Anton Vasilyev <vasilyev@...ras.ru>,
David Woodhouse <dwmw2@...radead.org>,
Brian Norris <computersforpeace@...il.com>,
Marek Vasut <marek.vasut@...il.com>,
Richard Weinberger <richard@....at>,
Cyrille Pitchen <cyrille.pitchen@...ev4u.fr>,
linux-mtd@...ts.infradead.org, linux-kernel@...r.kernel.org,
ldv-project@...uxtesting.org
Subject: [PATCH v1] mtd: plat-ram: use release_mem_region instead of release_resource
Use api pair of request_mem_region and release_mem_region
instead of release_resource.
Found by Linux Driver Verification project (linuxtesting.
Signed-off-by: Anton Vasilyev <vasilyev@...ras.ru>
---
v1: Fix commit based on Boris Brezillon review
---
drivers/mtd/maps/plat-ram.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/mtd/maps/plat-ram.c b/drivers/mtd/maps/plat-ram.c
index 5157289..90bc87f 100644
--- a/drivers/mtd/maps/plat-ram.c
+++ b/drivers/mtd/maps/plat-ram.c
@@ -100,8 +100,8 @@ static int platram_remove(struct platform_device *pdev)
/* release resources */
if (info->area) {
- release_resource(info->area);
- kfree(info->area);
+ release_mem_region(info->area->start,
+ resource_size(info->area));
}
if (info->map.virt != NULL)
--
2.7.4
Powered by blists - more mailing lists