staging: dgap: remove redundant setting a variable
authorDaeseok Youn <daeseok.youn@gmail.com>
Mon, 18 Aug 2014 14:31:46 +0000 (23:31 +0900)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 30 Aug 2014 21:04:58 +0000 (14:04 -0700)
The brd(board_t) is initialized with zero, so "intr_used"
is not needed to set zero when request_irq() is failed.

Signed-off-by: Daeseok Youn <daeseok.youn@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/dgap/dgap.c

index 45f20b4..ff95376 100644 (file)
@@ -846,14 +846,9 @@ static int dgap_request_irq(struct board_t *brd)
 
                rc = request_irq(brd->irq, dgap_intr, IRQF_SHARED, "DGAP", brd);
 
-               if (rc)
-                       brd->intr_used = 0;
-               else
+               if (!rc)
                        brd->intr_used = 1;
-       } else {
-               brd->intr_used = 0;
        }
-
        return 0;
 }