mirror of
				https://github.com/torvalds/linux.git
				synced 2025-11-04 10:40:15 +02:00 
			
		
		
		
	firmware loader: Fix _request_firmware_load() return val for fw load abort
_request_firmware_load() returns -ENOMEM when fw load is aborted after timeout. Call is_fw_load_aborted() to check if fw load is aborted and if true return -EAGAIN. Signed-off-by: Shuah Khan <shuah.kh@samsung.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
		
							parent
							
								
									d2168146c2
								
							
						
					
					
						commit
						0542ad88fb
					
				
					 1 changed files with 3 additions and 1 deletions
				
			
		| 
						 | 
					@ -906,7 +906,9 @@ static int _request_firmware_load(struct firmware_priv *fw_priv,
 | 
				
			||||||
	wait_for_completion(&buf->completion);
 | 
						wait_for_completion(&buf->completion);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	cancel_delayed_work_sync(&fw_priv->timeout_work);
 | 
						cancel_delayed_work_sync(&fw_priv->timeout_work);
 | 
				
			||||||
	if (!buf->data)
 | 
						if (is_fw_load_aborted(buf))
 | 
				
			||||||
 | 
							retval = -EAGAIN;
 | 
				
			||||||
 | 
						else if (!buf->data)
 | 
				
			||||||
		retval = -ENOMEM;
 | 
							retval = -ENOMEM;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	device_remove_file(f_dev, &dev_attr_loading);
 | 
						device_remove_file(f_dev, &dev_attr_loading);
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
		Reference in a new issue