[<prev] [next>] [day] [month] [year] [list]
Message-ID: <20141008111248.GA21995@devel>
Date: Wed, 8 Oct 2014 20:12:48 +0900
From: Daeseok Youn <daeseok.youn@...il.com>
To: lidza.louina@...il.com, markh@...pro.net
Cc: markh@...pro.net, daeseok.youn@...il.com,
gregkh@...uxfoundation.org, driverdev-devel@...uxdriverproject.org,
devel@...verdev.osuosl.org, linux-kernel@...r.kernel.org,
dan.carpenter@...cle.com
Subject: [PATCH 1/3] staging: dgap: remove unnecessary if statement for
checking NULL
dgap_release_remap() function is only called after the memory
has been remapped so if statement for checking NULL doesn't
need.
And also release_mem_region() calls are moved after iounmap() calls.
Signed-off-by: Daeseok Youn <daeseok.youn@...il.com>
---
drivers/staging/dgap/dgap.c | 13 ++++---------
1 files changed, 4 insertions(+), 9 deletions(-)
diff --git a/drivers/staging/dgap/dgap.c b/drivers/staging/dgap/dgap.c
index d0be1ce..a48740f 100644
--- a/drivers/staging/dgap/dgap.c
+++ b/drivers/staging/dgap/dgap.c
@@ -1013,15 +1013,10 @@ static int dgap_do_remap(struct board_t *brd)
static void dgap_release_remap(struct board_t *brd)
{
- if (brd->re_map_membase) {
- release_mem_region(brd->membase, 0x200000);
- iounmap(brd->re_map_membase);
- }
-
- if (brd->re_map_port) {
- release_mem_region(brd->membase + PCI_IO_OFFSET, 0x200000);
- iounmap(brd->re_map_port);
- }
+ iounmap(brd->re_map_port);
+ iounmap(brd->re_map_membase);
+ release_mem_region(brd->membase + PCI_IO_OFFSET, 0x200000);
+ release_mem_region(brd->membase, 0x200000);
}
/*****************************************************************************
*
--
1.7.1
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists