Commit 96b269c1 authored by Andre Bartke's avatar Andre Bartke Committed by Matthew Garrett

drivers/platform/x86: Fix memory leak

data is not freed in the error case of
compal_probe().
Signed-off-by: default avatarAndre Bartke <andre.bartke@gmail.com>
Signed-off-by: default avatarMatthew Garrett <mjg@redhat.com>
parent 2d43f671
......@@ -1030,8 +1030,10 @@ static int __devinit compal_probe(struct platform_device *pdev)
initialize_fan_control_data(data);
err = sysfs_create_group(&pdev->dev.kobj, &compal_attribute_group);
if (err)
if (err) {
kfree(data);
return err;
}
data->hwmon_dev = hwmon_device_register(&pdev->dev);
if (IS_ERR(data->hwmon_dev)) {
......
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