mirror of
				https://github.com/torvalds/linux.git
				synced 2025-11-04 10:40:15 +02:00 
			
		
		
		
	tracing: Fix a NULL vs IS_ERR() bug in event_subsystem_dir()
The eventfs_create_dir() function returns error pointers, it never returns
NULL.  Update the check to reflect that.
Link: https://lore.kernel.org/linux-trace-kernel/ff641474-84e2-46a7-9d7a-62b251a1050c@moroto.mountain
Cc: Masami Hiramatsu <mhiramat@kernel.org>
Fixes: 5790b1fb3d ("eventfs: Remove eventfs_file and just use eventfs_inode")
Signed-off-by: Dan Carpenter <dan.carpenter@linaro.org>
Signed-off-by: Steven Rostedt (Google) <rostedt@goodmis.org>
			
			
This commit is contained in:
		
							parent
							
								
									7e8ad67c9b
								
							
						
					
					
						commit
						5264a2f4bb
					
				
					 1 changed files with 1 additions and 1 deletions
				
			
		| 
						 | 
					@ -2354,7 +2354,7 @@ event_subsystem_dir(struct trace_array *tr, const char *name,
 | 
				
			||||||
		nr_entries = ARRAY_SIZE(system_entries);
 | 
							nr_entries = ARRAY_SIZE(system_entries);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	ei = eventfs_create_dir(name, parent, system_entries, nr_entries, dir);
 | 
						ei = eventfs_create_dir(name, parent, system_entries, nr_entries, dir);
 | 
				
			||||||
	if (!ei) {
 | 
						if (IS_ERR(ei)) {
 | 
				
			||||||
		pr_warn("Failed to create system directory %s\n", name);
 | 
							pr_warn("Failed to create system directory %s\n", name);
 | 
				
			||||||
		__put_system(system);
 | 
							__put_system(system);
 | 
				
			||||||
		goto out_free;
 | 
							goto out_free;
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
		Reference in a new issue