Commit aa9895da authored by Daeseok Youn's avatar Daeseok Youn Committed by Greg Kroah-Hartman
Browse files

staging: dgap: use gotos for handling error in dgap_remap()

Signed-off-by: default avatarDaeseok Youn <>
Signed-off-by: default avatarGreg Kroah-Hartman <>
parent 7f703fae
...@@ -1400,27 +1400,27 @@ static int dgap_remap(struct board_t *brd) ...@@ -1400,27 +1400,27 @@ static int dgap_remap(struct board_t *brd)
return -ENOMEM; return -ENOMEM;
if (!request_mem_region(brd->membase + PCI_IO_OFFSET, 0x200000, if (!request_mem_region(brd->membase + PCI_IO_OFFSET, 0x200000,
"dgap")) { "dgap"))
release_mem_region(brd->membase, 0x200000); goto err_req_mem;
return -ENOMEM;
brd->re_map_membase = ioremap(brd->membase, 0x200000); brd->re_map_membase = ioremap(brd->membase, 0x200000);
if (!brd->re_map_membase) { if (!brd->re_map_membase)
release_mem_region(brd->membase, 0x200000); goto err_remap_mem;
release_mem_region(brd->membase + PCI_IO_OFFSET, 0x200000);
return -ENOMEM;
brd->re_map_port = ioremap((brd->membase + PCI_IO_OFFSET), 0x200000); brd->re_map_port = ioremap((brd->membase + PCI_IO_OFFSET), 0x200000);
if (!brd->re_map_port) { if (!brd->re_map_port)
release_mem_region(brd->membase, 0x200000); goto err_remap_port;
release_mem_region(brd->membase + PCI_IO_OFFSET, 0x200000);
return -ENOMEM;
return 0; return 0;
release_mem_region(brd->membase + PCI_IO_OFFSET, 0x200000);
release_mem_region(brd->membase, 0x200000);
return -ENOMEM;
} }
static void dgap_unmap(struct board_t *brd) static void dgap_unmap(struct board_t *brd)
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