diff options
author | Fabio Estevam <festevam@gmail.com> | 2017-08-07 19:44:11 +0200 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2017-08-28 20:51:19 +0200 |
commit | 62f466ee0398d9c67e7a867090324794afff1525 (patch) | |
tree | 1ce42bd24010d03b450af58a97fef44e3d7fdcab /drivers/tty | |
parent | tty: serial: sprd: fix error return code in sprd_probe() (diff) | |
download | linux-62f466ee0398d9c67e7a867090324794afff1525.tar.xz linux-62f466ee0398d9c67e7a867090324794afff1525.zip |
serial: pch_uart: Remove unneeded NULL check
There is no need to do a NULL check for debugfs_remove().
Quoting Documentation/filesystems/debugfs.txt:
"The dentry value can be NULL, in which case nothing will be removed."
, so remove the unneeded NULL check.
Signed-off-by: Fabio Estevam <festevam@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/tty')
-rw-r--r-- | drivers/tty/serial/pch_uart.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/tty/serial/pch_uart.c b/drivers/tty/serial/pch_uart.c index d3796dc26fa9..3788198f105b 100644 --- a/drivers/tty/serial/pch_uart.c +++ b/drivers/tty/serial/pch_uart.c @@ -1862,8 +1862,7 @@ static void pch_uart_exit_port(struct eg20t_port *priv) { #ifdef CONFIG_DEBUG_FS - if (priv->debugfs) - debugfs_remove(priv->debugfs); + debugfs_remove(priv->debugfs); #endif uart_remove_one_port(&pch_uart_driver, &priv->port); free_page((unsigned long)priv->rxbuf.buf); |