mirror of
				https://github.com/torvalds/linux.git
				synced 2025-11-04 10:40:15 +02:00 
			
		
		
		
	rtc: rv8803: simplify the return expression of rv8803_nvram_write
Simplify the return expression. Signed-off-by: Liu Shixin <liushixin2@huawei.com> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Link: https://lore.kernel.org/r/20200921082449.2591981-1-liushixin2@huawei.com
This commit is contained in:
		
							parent
							
								
									9ce42e8e03
								
							
						
					
					
						commit
						179b4bcc4c
					
				
					 1 changed files with 1 additions and 7 deletions
				
			
		| 
						 | 
					@ -454,13 +454,7 @@ static int rv8803_ioctl(struct device *dev, unsigned int cmd, unsigned long arg)
 | 
				
			||||||
static int rv8803_nvram_write(void *priv, unsigned int offset, void *val,
 | 
					static int rv8803_nvram_write(void *priv, unsigned int offset, void *val,
 | 
				
			||||||
			      size_t bytes)
 | 
								      size_t bytes)
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
	int ret;
 | 
						return rv8803_write_reg(priv, RV8803_RAM, *(u8 *)val);
 | 
				
			||||||
 | 
					 | 
				
			||||||
	ret = rv8803_write_reg(priv, RV8803_RAM, *(u8 *)val);
 | 
					 | 
				
			||||||
	if (ret)
 | 
					 | 
				
			||||||
		return ret;
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
	return 0;
 | 
					 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
static int rv8803_nvram_read(void *priv, unsigned int offset,
 | 
					static int rv8803_nvram_read(void *priv, unsigned int offset,
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
		Reference in a new issue