Skip to content

Commit

Permalink
serial: pch_uart: Remove unneeded NULL check
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Fabio Estevam authored and Greg Kroah-Hartman committed Aug 28, 2017
1 parent ec085c5 commit 62f466e
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions drivers/tty/serial/pch_uart.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 62f466e

Please sign in to comment.