]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - drivers/acpi/toshiba_acpi.c
MAINTAINER
[linux-2.6-omap-h63xx.git] / drivers / acpi / toshiba_acpi.c
index 88aeccbafaaf9e46ed4678b573e0f28cc6a6f5f2..d9b651ffcdc0c21335f1c15e1e7ef7e3d86361cf 100644 (file)
@@ -321,13 +321,16 @@ static int set_lcd_status(struct backlight_device *bd)
 static unsigned long write_lcd(const char *buffer, unsigned long count)
 {
        int value;
-       int ret = count;
+       int ret;
 
        if (sscanf(buffer, " brightness : %i", &value) == 1 &&
-           value >= 0 && value < HCI_LCD_BRIGHTNESS_LEVELS)
+           value >= 0 && value < HCI_LCD_BRIGHTNESS_LEVELS) {
                ret = set_lcd(value);
-       else
+               if (ret == 0)
+                       ret = count;
+       } else {
                ret = -EINVAL;
+       }
        return ret;
 }