Commit 62f466ee authored by Fabio Estevam's avatar Fabio Estevam Committed by Greg Kroah-Hartman

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: default avatarFabio Estevam <festevam@gmail.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent ec085c5a
......@@ -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);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment