aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/s390
diff options
context:
space:
mode:
authorFabian Frederick <fabf@skynet.be>2014-06-26 13:41:46 -0400
committerMartin Schwidefsky <schwidefsky@de.ibm.com>2014-07-22 03:26:16 -0400
commitd7309aaadd7e830651ba720e3ae7374e29baeb2d (patch)
treed5f28899e8b7dc44333a4d679faba3d6d3f4d2c2 /drivers/s390
parent852eb1aa2bd342dede0126f50d4fde7d963db32e (diff)
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: Fabian Frederick <fabf@skynet.be> Signed-off-by: Stefan Haberland <stefan.haberland@de.ibm.com> Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
Diffstat (limited to 'drivers/s390')
-rw-r--r--drivers/s390/block/dasd.c25
1 files changed, 8 insertions, 17 deletions
diff --git a/drivers/s390/block/dasd.c b/drivers/s390/block/dasd.c
index 1eef0f586950..ea2729fbc86c 100644
--- a/drivers/s390/block/dasd.c
+++ b/drivers/s390/block/dasd.c
@@ -283,8 +283,7 @@ static int dasd_state_basic_to_known(struct dasd_device *device)
283 283
284 if (device->block) { 284 if (device->block) {
285 dasd_profile_exit(&device->block->profile); 285 dasd_profile_exit(&device->block->profile);
286 if (device->block->debugfs_dentry) 286 debugfs_remove(device->block->debugfs_dentry);
287 debugfs_remove(device->block->debugfs_dentry);
288 dasd_gendisk_free(device->block); 287 dasd_gendisk_free(device->block);
289 dasd_block_clear_timer(device->block); 288 dasd_block_clear_timer(device->block);
290 } 289 }
@@ -293,9 +292,7 @@ static int dasd_state_basic_to_known(struct dasd_device *device)
293 return rc; 292 return rc;
294 dasd_device_clear_timer(device); 293 dasd_device_clear_timer(device);
295 dasd_profile_exit(&device->profile); 294 dasd_profile_exit(&device->profile);
296 if (device->debugfs_dentry) 295 debugfs_remove(device->debugfs_dentry);
297 debugfs_remove(device->debugfs_dentry);
298
299 DBF_DEV_EVENT(DBF_EMERG, device, "%p debug area deleted", device); 296 DBF_DEV_EVENT(DBF_EMERG, device, "%p debug area deleted", device);
300 if (device->debug_area != NULL) { 297 if (device->debug_area != NULL) {
301 debug_unregister(device->debug_area); 298 debug_unregister(device->debug_area);
@@ -1111,23 +1108,17 @@ static void dasd_profile_init(struct dasd_profile *profile,
1111static void dasd_profile_exit(struct dasd_profile *profile) 1108static void dasd_profile_exit(struct dasd_profile *profile)
1112{ 1109{
1113 dasd_profile_off(profile); 1110 dasd_profile_off(profile);
1114 if (profile->dentry) { 1111 debugfs_remove(profile->dentry);
1115 debugfs_remove(profile->dentry); 1112 profile->dentry = NULL;
1116 profile->dentry = NULL;
1117 }
1118} 1113}
1119 1114
1120static void dasd_statistics_removeroot(void) 1115static void dasd_statistics_removeroot(void)
1121{ 1116{
1122 dasd_global_profile_level = DASD_PROFILE_OFF; 1117 dasd_global_profile_level = DASD_PROFILE_OFF;
1123 if (dasd_global_profile_dentry) { 1118 debugfs_remove(dasd_global_profile_dentry);
1124 debugfs_remove(dasd_global_profile_dentry); 1119 dasd_global_profile_dentry = NULL;
1125 dasd_global_profile_dentry = NULL; 1120 debugfs_remove(dasd_debugfs_global_entry);
1126 } 1121 debugfs_remove(dasd_debugfs_root_entry);
1127 if (dasd_debugfs_global_entry)
1128 debugfs_remove(dasd_debugfs_global_entry);
1129 if (dasd_debugfs_root_entry)
1130 debugfs_remove(dasd_debugfs_root_entry);
1131} 1122}
1132 1123
1133static void dasd_statistics_createroot(void) 1124static void dasd_statistics_createroot(void)