Commit 14ad5165 authored by Daeseok Youn's avatar Daeseok Youn Committed by Greg Kroah-Hartman

staging: dgnc: remove redundant null check in

the "brd" was already checked for NULL before calling dgnc_do_remap().

the dgnc_do_remap() function was called only
from the dgnc_found_board() and the DGNC_BOARD_MAGIC value
was assigned to "brd->magic" in dgcn_found_board(). So it doesn't
need to check about magic value.
Signed-off-by: default avatarDaeseok Youn <daeseok.youn@gmail.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent fb7d94a7
...@@ -599,9 +599,6 @@ static int dgnc_finalize_board_init(struct dgnc_board *brd) ...@@ -599,9 +599,6 @@ static int dgnc_finalize_board_init(struct dgnc_board *brd)
*/ */
static void dgnc_do_remap(struct dgnc_board *brd) static void dgnc_do_remap(struct dgnc_board *brd)
{ {
if (!brd || brd->magic != DGNC_BOARD_MAGIC)
return;
brd->re_map_membase = ioremap(brd->membase, 0x1000); brd->re_map_membase = ioremap(brd->membase, 0x1000);
} }
......
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