mirror of
				https://github.com/torvalds/linux.git
				synced 2025-11-04 02:30:34 +02:00 
			
		
		
		
	rtc: pcf85063: replace dev_err+return with return dev_err_probe
Replace the dev_err plus return combo with return dev_err_probe() this actually communicates the error type when it occurs and helps debugging hardware issues. Signed-off-by: Maud Spierings <maudspierings@gocontroll.com> Link: https://lore.kernel.org/r/20250304-rtc_dev_err_probe-v1-1-9dcc042ad17e@gocontroll.com Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
This commit is contained in:
		
							parent
							
								
									2b7cbd9849
								
							
						
					
					
						commit
						119e90a3a6
					
				
					 1 changed files with 2 additions and 4 deletions
				
			
		| 
						 | 
					@ -591,10 +591,8 @@ static int pcf85063_probe(struct i2c_client *client)
 | 
				
			||||||
	i2c_set_clientdata(client, pcf85063);
 | 
						i2c_set_clientdata(client, pcf85063);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	err = regmap_read(pcf85063->regmap, PCF85063_REG_SC, &tmp);
 | 
						err = regmap_read(pcf85063->regmap, PCF85063_REG_SC, &tmp);
 | 
				
			||||||
	if (err) {
 | 
						if (err)
 | 
				
			||||||
		dev_err(&client->dev, "RTC chip is not present\n");
 | 
							return dev_err_probe(&client->dev, err, "RTC chip is not present\n");
 | 
				
			||||||
		return err;
 | 
					 | 
				
			||||||
	}
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
	pcf85063->rtc = devm_rtc_allocate_device(&client->dev);
 | 
						pcf85063->rtc = devm_rtc_allocate_device(&client->dev);
 | 
				
			||||||
	if (IS_ERR(pcf85063->rtc))
 | 
						if (IS_ERR(pcf85063->rtc))
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
		Reference in a new issue