From 26164edb8fb467a4249fab159709a6cfc50ddc8c Mon Sep 17 00:00:00 2001 From: Greg Kroah-Hartman Date: Tue, 24 Mar 2015 20:06:41 +0100 Subject: [PATCH] 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 --- drivers/staging/greybus/es1.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/staging/greybus/es1.c b/drivers/staging/greybus/es1.c index cce31558573b..723d8b7a0eab 100644 --- a/drivers/staging/greybus/es1.c +++ b/drivers/staging/greybus/es1.c @@ -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);