* [PATCH 1/3] staging: dgap: remove unnecessary if statement for checking NULL
@ 2014-10-08 11:12 Daeseok Youn
0 siblings, 0 replies; only message in thread
From: Daeseok Youn @ 2014-10-08 11:12 UTC (permalink / raw)
To: lidza.louina, markh
Cc: markh, daeseok.youn, gregkh, driverdev-devel, devel, linux-kernel,
dan.carpenter
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@gmail.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
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2014-10-08 11:14 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-10-08 11:12 [PATCH 1/3] staging: dgap: remove unnecessary if statement for checking NULL Daeseok Youn
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox