提交 5c3b48d9 编写于 作者: M Mark Hounschell 提交者: Greg Kroah-Hartman

staging: dgap: remove two unnecessary conditionals

Remove 2 unnessessary conditionals. They are always
false in this code path.
Signed-off-by: NMark Hounschell <markh@compro.net>
Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
上级 7496e053
...@@ -1271,25 +1271,21 @@ static int dgap_tty_register(struct board_t *brd) ...@@ -1271,25 +1271,21 @@ static int dgap_tty_register(struct board_t *brd)
*/ */
tty_set_operations(brd->PrintDriver, &dgap_tty_ops); tty_set_operations(brd->PrintDriver, &dgap_tty_ops);
if (!brd->dgap_Major_Serial_Registered) { /* Register tty devices */
/* Register tty devices */ rc = tty_register_driver(brd->SerialDriver);
rc = tty_register_driver(brd->SerialDriver); if (rc < 0)
if (rc < 0) return rc;
return rc; brd->dgap_Major_Serial_Registered = TRUE;
brd->dgap_Major_Serial_Registered = TRUE; dgap_BoardsByMajor[brd->SerialDriver->major] = brd;
dgap_BoardsByMajor[brd->SerialDriver->major] = brd; brd->dgap_Serial_Major = brd->SerialDriver->major;
brd->dgap_Serial_Major = brd->SerialDriver->major;
}
if (!brd->dgap_Major_TransparentPrint_Registered) { /* Register Transparent Print devices */
/* Register Transparent Print devices */ rc = tty_register_driver(brd->PrintDriver);
rc = tty_register_driver(brd->PrintDriver); if (rc < 0)
if (rc < 0) return rc;
return rc; brd->dgap_Major_TransparentPrint_Registered = TRUE;
brd->dgap_Major_TransparentPrint_Registered = TRUE; dgap_BoardsByMajor[brd->PrintDriver->major] = brd;
dgap_BoardsByMajor[brd->PrintDriver->major] = brd; brd->dgap_TransparentPrint_Major = brd->PrintDriver->major;
brd->dgap_TransparentPrint_Major = brd->PrintDriver->major;
}
return rc; return rc;
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册