mirror of
				https://github.com/smaeul/u-boot.git
				synced 2025-11-03 21:48:15 +00:00 
			
		
		
		
	rkcommon.c: Drop pointless assignment
Assigning a variable to itself is not necessary. Drop this and also add a check for malloc() failure. Signed-off-by: Simon Glass <sjg@chromium.org> Reported-by: Coverity (CID: 161418) Fixes: 111bcc4 (rockchip: mkimage: pad the header to 8-bytes (using a 'nop') for RK3399)
This commit is contained in:
		
							parent
							
								
									baa7d345fb
								
							
						
					
					
						commit
						22929bec52
					
				@ -380,8 +380,9 @@ int rkcommon_vrec_header(struct image_tool_params *params,
 | 
			
		||||
 | 
			
		||||
	/* Allocate, clear and install the header */
 | 
			
		||||
	tparams->hdr = malloc(tparams->header_size);
 | 
			
		||||
	if (!tparams->hdr)
 | 
			
		||||
		return -ENOMEM;
 | 
			
		||||
	memset(tparams->hdr, 0, tparams->header_size);
 | 
			
		||||
	tparams->header_size = tparams->header_size;
 | 
			
		||||
 | 
			
		||||
	/*
 | 
			
		||||
	 * If someone passed in 0 for the alignment, we'd better handle
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user