mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-05-13 01:15:56 -04:00
staging: dgnc: remove redundant variable null check
The unit struct(un_t) was not used in dgnc_tty_hangup(). Signed-off-by: Daeseok Youn <daeseok.youn@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
3ca4b20a76
commit
18419f77a2
@@ -1289,15 +1289,9 @@ static int dgnc_block_til_ready(struct tty_struct *tty,
|
||||
*/
|
||||
static void dgnc_tty_hangup(struct tty_struct *tty)
|
||||
{
|
||||
struct un_t *un;
|
||||
|
||||
if (!tty || tty->magic != TTY_MAGIC)
|
||||
return;
|
||||
|
||||
un = tty->driver_data;
|
||||
if (!un || un->magic != DGNC_UNIT_MAGIC)
|
||||
return;
|
||||
|
||||
/* flush the transmit queues */
|
||||
dgnc_tty_flush_buffer(tty);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user