greybus: es1: no need to check for NULL on debugfs_remove()

The function can, and even expects NULL, so don't check.

Signed-off-by: Greg Kroah-Hartman <greg@kroah.com>
This commit is contained in:
Greg Kroah-Hartman 2015-03-24 20:06:41 +01:00
parent cd674c8d4c
commit 26164edb8f

View File

@ -558,10 +558,8 @@ static void usb_log_enable(struct es1_ap_dev *es1, int enable)
gb_debugfs_get(), NULL,
&apb1_log_fops);
} else {
if (apb1_log_dentry) {
debugfs_remove(apb1_log_dentry);
apb1_log_dentry = NULL;
}
debugfs_remove(apb1_log_dentry);
apb1_log_dentry = NULL;
if (apb1_log_task) {
kthread_stop(apb1_log_task);