aboutsummaryrefslogtreecommitdiffstats
path: root/arch/s390/kernel/debug.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/s390/kernel/debug.c')
-rw-r--r--arch/s390/kernel/debug.c9
1 files changed, 3 insertions, 6 deletions
diff --git a/arch/s390/kernel/debug.c b/arch/s390/kernel/debug.c
index ba03fc0a3a56..be8bceaf37d9 100644
--- a/arch/s390/kernel/debug.c
+++ b/arch/s390/kernel/debug.c
@@ -603,7 +603,7 @@ debug_input(struct file *file, const char __user *user_buf, size_t length,
603static int 603static int
604debug_open(struct inode *inode, struct file *file) 604debug_open(struct inode *inode, struct file *file)
605{ 605{
606 int i = 0, rc = 0; 606 int i, rc = 0;
607 file_private_info_t *p_info; 607 file_private_info_t *p_info;
608 debug_info_t *debug_info, *debug_info_snapshot; 608 debug_info_t *debug_info, *debug_info_snapshot;
609 609
@@ -642,8 +642,7 @@ found:
642 p_info = kmalloc(sizeof(file_private_info_t), 642 p_info = kmalloc(sizeof(file_private_info_t),
643 GFP_KERNEL); 643 GFP_KERNEL);
644 if(!p_info){ 644 if(!p_info){
645 if(debug_info_snapshot) 645 debug_info_free(debug_info_snapshot);
646 debug_info_free(debug_info_snapshot);
647 rc = -ENOMEM; 646 rc = -ENOMEM;
648 goto out; 647 goto out;
649 } 648 }
@@ -698,8 +697,7 @@ debug_info_t *debug_register_mode(const char *name, int pages_per_area,
698 if ((uid != 0) || (gid != 0)) 697 if ((uid != 0) || (gid != 0))
699 pr_warning("Root becomes the owner of all s390dbf files " 698 pr_warning("Root becomes the owner of all s390dbf files "
700 "in sysfs\n"); 699 "in sysfs\n");
701 if (!initialized) 700 BUG_ON(!initialized);
702 BUG();
703 mutex_lock(&debug_mutex); 701 mutex_lock(&debug_mutex);
704 702
705 /* create new debug_info */ 703 /* create new debug_info */
@@ -1156,7 +1154,6 @@ debug_unregister_view(debug_info_t * id, struct debug_view *view)
1156 else { 1154 else {
1157 debugfs_remove(id->debugfs_entries[i]); 1155 debugfs_remove(id->debugfs_entries[i]);
1158 id->views[i] = NULL; 1156 id->views[i] = NULL;
1159 rc = 0;
1160 } 1157 }
1161 spin_unlock_irqrestore(&id->lock, flags); 1158 spin_unlock_irqrestore(&id->lock, flags);
1162out: 1159out: