Commit df149d02 authored by Julia Lawall's avatar Julia Lawall Committed by Jean Delvare

hwmon: (k8temp) Adjust confusing if indentation

Move the if(err) statement after the if into the if branch indicated by its
indentation.  The preceding if(err) test implies that err cannot be nonzero
unless the if branch is taken.

The semantic match that finds this problem is as follows:
(http://coccinelle.lip6.fr/)

// <smpl>
@r disable braces5@
position p1,p2;
statement S1,S2;
@@

(
if (...) { ... }
|
if (...) S1@p1 S2@p2
)

@script:python@
p1 << r.p1;
p2 << r.p2;
@@

if (p1[0].column == p2[0].column):
 cocci.print_main("branch",p4)
 cocci.print_secs("after",p5)
// </smpl>  
Signed-off-by: default avatarJulia Lawall <julia@diku.dk>
Signed-off-by: default avatarJean Delvare <khali@linux-fr.org>
parent 92fa5bd9
...@@ -252,13 +252,14 @@ static int __devinit k8temp_probe(struct pci_dev *pdev, ...@@ -252,13 +252,14 @@ static int __devinit k8temp_probe(struct pci_dev *pdev,
&sensor_dev_attr_temp3_input.dev_attr); &sensor_dev_attr_temp3_input.dev_attr);
if (err) if (err)
goto exit_remove; goto exit_remove;
if (data->sensorsp & SEL_PLACE) if (data->sensorsp & SEL_PLACE) {
err = device_create_file(&pdev->dev, err = device_create_file(&pdev->dev,
&sensor_dev_attr_temp4_input. &sensor_dev_attr_temp4_input.
dev_attr); dev_attr);
if (err) if (err)
goto exit_remove; goto exit_remove;
} }
}
err = device_create_file(&pdev->dev, &dev_attr_name); err = device_create_file(&pdev->dev, &dev_attr_name);
if (err) if (err)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment