Skip to content

Commit

Permalink
acer-wmi: Cleanup the failure cleanup handling
Browse files Browse the repository at this point in the history
Cleanup the failure cleanup handling for brightness and email led.

[cc: Split out from another patch]

Signed-off-by: Andy Whitcroft <apw@canonical.com>
Signed-off-by: Carlos Corbacho <carlos@strangeworlds.co.uk>
Signed-off-by: Len Brown <len.brown@intel.com>
  • Loading branch information
Andy Whitcroft authored and Len Brown committed Apr 4, 2009
1 parent a74dd5f commit 350e329
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion drivers/platform/x86/acer-wmi.c
Original file line number Diff line number Diff line change
Expand Up @@ -1136,11 +1136,17 @@ static int __devinit acer_platform_probe(struct platform_device *device)
}

err = acer_rfkill_init(&device->dev);
if (err)
goto error_rfkill;

return err;

error_rfkill:
if (has_cap(ACER_CAP_BRIGHTNESS))
acer_backlight_exit();
error_brightness:
acer_led_exit();
if (has_cap(ACER_CAP_MAILLED))
acer_led_exit();
error_mailled:
return err;
}
Expand Down

0 comments on commit 350e329

Please sign in to comment.