Commit 9f2b7444 authored by Daeseok Youn's avatar Daeseok Youn Committed by Greg Kroah-Hartman

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: default avatarDaeseok Youn <daeseok.youn@gmail.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 748d9dd1
......@@ -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);
}
/*****************************************************************************
*
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment