forked from mirrors/linux
		
	hwmon: (lm70) Fix: do not use assignment in if condition
Fix checkpatch issue: ERROR: do not use assignment in if condition Signed-off-by: Guenter Roeck <linux@roeck-us.net>
This commit is contained in:
		
							parent
							
								
									e200c14f60
								
							
						
					
					
						commit
						7599d32b13
					
				
					 1 changed files with 6 additions and 4 deletions
				
			
		|  | @ -158,11 +158,12 @@ static int __devinit lm70_probe(struct spi_device *spi) | ||||||
| 
 | 
 | ||||||
| 	spi_set_drvdata(spi, p_lm70); | 	spi_set_drvdata(spi, p_lm70); | ||||||
| 
 | 
 | ||||||
| 	if ((status = device_create_file(&spi->dev, &dev_attr_temp1_input)) | 	status = device_create_file(&spi->dev, &dev_attr_temp1_input); | ||||||
| 	 || (status = device_create_file(&spi->dev, &dev_attr_name))) { | 	if (status) | ||||||
| 		dev_dbg(&spi->dev, "device_create_file failure.\n"); | 		goto out_dev_create_temp_file_failed; | ||||||
|  | 	status = device_create_file(&spi->dev, &dev_attr_name); | ||||||
|  | 	if (status) | ||||||
| 		goto out_dev_create_file_failed; | 		goto out_dev_create_file_failed; | ||||||
| 	} |  | ||||||
| 
 | 
 | ||||||
| 	/* sysfs hook */ | 	/* sysfs hook */ | ||||||
| 	p_lm70->hwmon_dev = hwmon_device_register(&spi->dev); | 	p_lm70->hwmon_dev = hwmon_device_register(&spi->dev); | ||||||
|  | @ -178,6 +179,7 @@ static int __devinit lm70_probe(struct spi_device *spi) | ||||||
| 	device_remove_file(&spi->dev, &dev_attr_name); | 	device_remove_file(&spi->dev, &dev_attr_name); | ||||||
| out_dev_create_file_failed: | out_dev_create_file_failed: | ||||||
| 	device_remove_file(&spi->dev, &dev_attr_temp1_input); | 	device_remove_file(&spi->dev, &dev_attr_temp1_input); | ||||||
|  | out_dev_create_temp_file_failed: | ||||||
| 	spi_set_drvdata(spi, NULL); | 	spi_set_drvdata(spi, NULL); | ||||||
| 	kfree(p_lm70); | 	kfree(p_lm70); | ||||||
| 	return status; | 	return status; | ||||||
|  |  | ||||||
		Loading…
	
		Reference in a new issue
	
	 Guenter Roeck
						Guenter Roeck