]> git.karo-electronics.de Git - linux-beck.git/commitdiff
staging: dgap: remove two unnecessary conditionals
authorMark Hounschell <markh@compro.net>
Fri, 25 Apr 2014 17:10:19 +0000 (13:10 -0400)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 16 May 2014 19:18:24 +0000 (12:18 -0700)
Remove 2 unnessessary conditionals. They are always
false in this code path.

Signed-off-by: Mark Hounschell <markh@compro.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/dgap/dgap.c

index 2c7acee6c926530b797e4009a78d2bb14f3894d9..b834c83da9304a3bcc0a657a209eabb02c6f736c 100644 (file)
@@ -1271,25 +1271,21 @@ static int dgap_tty_register(struct board_t *brd)
         */
        tty_set_operations(brd->PrintDriver, &dgap_tty_ops);
 
-       if (!brd->dgap_Major_Serial_Registered) {
-               /* Register tty devices */
-               rc = tty_register_driver(brd->SerialDriver);
-               if (rc < 0)
-                       return rc;
-               brd->dgap_Major_Serial_Registered = TRUE;
-               dgap_BoardsByMajor[brd->SerialDriver->major] = brd;
-               brd->dgap_Serial_Major = brd->SerialDriver->major;
-       }
+       /* Register tty devices */
+       rc = tty_register_driver(brd->SerialDriver);
+       if (rc < 0)
+               return rc;
+       brd->dgap_Major_Serial_Registered = TRUE;
+       dgap_BoardsByMajor[brd->SerialDriver->major] = brd;
+       brd->dgap_Serial_Major = brd->SerialDriver->major;
 
-       if (!brd->dgap_Major_TransparentPrint_Registered) {
-               /* Register Transparent Print devices */
-               rc = tty_register_driver(brd->PrintDriver);
-               if (rc < 0)
-                       return rc;
-               brd->dgap_Major_TransparentPrint_Registered = TRUE;
-               dgap_BoardsByMajor[brd->PrintDriver->major] = brd;
-               brd->dgap_TransparentPrint_Major = brd->PrintDriver->major;
-       }
+       /* Register Transparent Print devices */
+       rc = tty_register_driver(brd->PrintDriver);
+       if (rc < 0)
+               return rc;
+       brd->dgap_Major_TransparentPrint_Registered = TRUE;
+       dgap_BoardsByMajor[brd->PrintDriver->major] = brd;
+       brd->dgap_TransparentPrint_Major = brd->PrintDriver->major;
 
        return rc;
 }