aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/hwmon/lm70.c
diff options
context:
space:
mode:
authorGuenter Roeck <linux@roeck-us.net>2012-01-20 00:05:07 -0500
committerGuenter Roeck <guenter.roeck@ericsson.com>2012-03-18 21:27:40 -0400
commit7599d32b1332546a3c0af17ce925ce7a8e89bfa1 (patch)
tree618457b176e86817c1bc116ae0b623cb27d25900 /drivers/hwmon/lm70.c
parente200c14f60765ee3be6517659ec8fea06e299e39 (diff)
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>
Diffstat (limited to 'drivers/hwmon/lm70.c')
-rw-r--r--drivers/hwmon/lm70.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/drivers/hwmon/lm70.c b/drivers/hwmon/lm70.c
index 61c2ffbb9dd0..472f79521a96 100644
--- a/drivers/hwmon/lm70.c
+++ b/drivers/hwmon/lm70.c
@@ -158,11 +158,12 @@ static int __devinit lm70_probe(struct spi_device *spi)
158 158
159 spi_set_drvdata(spi, p_lm70); 159 spi_set_drvdata(spi, p_lm70);
160 160
161 if ((status = device_create_file(&spi->dev, &dev_attr_temp1_input)) 161 status = device_create_file(&spi->dev, &dev_attr_temp1_input);
162 || (status = device_create_file(&spi->dev, &dev_attr_name))) { 162 if (status)
163 dev_dbg(&spi->dev, "device_create_file failure.\n"); 163 goto out_dev_create_temp_file_failed;
164 status = device_create_file(&spi->dev, &dev_attr_name);
165 if (status)
164 goto out_dev_create_file_failed; 166 goto out_dev_create_file_failed;
165 }
166 167
167 /* sysfs hook */ 168 /* sysfs hook */
168 p_lm70->hwmon_dev = hwmon_device_register(&spi->dev); 169 p_lm70->hwmon_dev = hwmon_device_register(&spi->dev);
@@ -178,6 +179,7 @@ out_dev_reg_failed:
178 device_remove_file(&spi->dev, &dev_attr_name); 179 device_remove_file(&spi->dev, &dev_attr_name);
179out_dev_create_file_failed: 180out_dev_create_file_failed:
180 device_remove_file(&spi->dev, &dev_attr_temp1_input); 181 device_remove_file(&spi->dev, &dev_attr_temp1_input);
182out_dev_create_temp_file_failed:
181 spi_set_drvdata(spi, NULL); 183 spi_set_drvdata(spi, NULL);
182 kfree(p_lm70); 184 kfree(p_lm70);
183 return status; 185 return status;