Commit d7309aaa authored by Fabian Frederick's avatar Fabian Frederick Committed by Martin Schwidefsky

s390/dasd: remove unnecessary null test before debugfs_remove

This fixes checkpatch warning:
"WARNING: debugfs_remove(NULL) is safe this check is probably not required"
Signed-off-by: default avatarFabian Frederick <fabf@skynet.be>
Signed-off-by: default avatarStefan Haberland <stefan.haberland@de.ibm.com>
Signed-off-by: default avatarMartin Schwidefsky <schwidefsky@de.ibm.com>
parent 852eb1aa
...@@ -283,8 +283,7 @@ static int dasd_state_basic_to_known(struct dasd_device *device) ...@@ -283,8 +283,7 @@ static int dasd_state_basic_to_known(struct dasd_device *device)
if (device->block) { if (device->block) {
dasd_profile_exit(&device->block->profile); dasd_profile_exit(&device->block->profile);
if (device->block->debugfs_dentry) debugfs_remove(device->block->debugfs_dentry);
debugfs_remove(device->block->debugfs_dentry);
dasd_gendisk_free(device->block); dasd_gendisk_free(device->block);
dasd_block_clear_timer(device->block); dasd_block_clear_timer(device->block);
} }
...@@ -293,9 +292,7 @@ static int dasd_state_basic_to_known(struct dasd_device *device) ...@@ -293,9 +292,7 @@ static int dasd_state_basic_to_known(struct dasd_device *device)
return rc; return rc;
dasd_device_clear_timer(device); dasd_device_clear_timer(device);
dasd_profile_exit(&device->profile); dasd_profile_exit(&device->profile);
if (device->debugfs_dentry) debugfs_remove(device->debugfs_dentry);
debugfs_remove(device->debugfs_dentry);
DBF_DEV_EVENT(DBF_EMERG, device, "%p debug area deleted", device); DBF_DEV_EVENT(DBF_EMERG, device, "%p debug area deleted", device);
if (device->debug_area != NULL) { if (device->debug_area != NULL) {
debug_unregister(device->debug_area); debug_unregister(device->debug_area);
...@@ -1111,23 +1108,17 @@ static void dasd_profile_init(struct dasd_profile *profile, ...@@ -1111,23 +1108,17 @@ static void dasd_profile_init(struct dasd_profile *profile,
static void dasd_profile_exit(struct dasd_profile *profile) static void dasd_profile_exit(struct dasd_profile *profile)
{ {
dasd_profile_off(profile); dasd_profile_off(profile);
if (profile->dentry) { debugfs_remove(profile->dentry);
debugfs_remove(profile->dentry); profile->dentry = NULL;
profile->dentry = NULL;
}
} }
static void dasd_statistics_removeroot(void) static void dasd_statistics_removeroot(void)
{ {
dasd_global_profile_level = DASD_PROFILE_OFF; dasd_global_profile_level = DASD_PROFILE_OFF;
if (dasd_global_profile_dentry) { debugfs_remove(dasd_global_profile_dentry);
debugfs_remove(dasd_global_profile_dentry); dasd_global_profile_dentry = NULL;
dasd_global_profile_dentry = NULL; debugfs_remove(dasd_debugfs_global_entry);
} debugfs_remove(dasd_debugfs_root_entry);
if (dasd_debugfs_global_entry)
debugfs_remove(dasd_debugfs_global_entry);
if (dasd_debugfs_root_entry)
debugfs_remove(dasd_debugfs_root_entry);
} }
static void dasd_statistics_createroot(void) static void dasd_statistics_createroot(void)
......
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