staging: dgnc: remove redundant null check in
authorDaeseok Youn <daeseok.youn@gmail.com>
Wed, 6 Jul 2016 06:16:44 +0000 (15:16 +0900)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 15 Aug 2016 17:13:25 +0000 (19:13 +0200)
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: Daeseok Youn <daeseok.youn@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/dgnc/dgnc_driver.c

index e699375..cc6105a 100644 (file)
@@ -599,9 +599,6 @@ static int dgnc_finalize_board_init(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);
 }