Skip to content

Commit

Permalink
sony-laptop: fix bogus error message display on resume
Browse files Browse the repository at this point in the history
sony_backlight_update_status returns 0 on success -1 on failure (i.e.: the
return value from acpi_callsetfunc. The return value in the resume path
was broken and thus always displaying a bogus warning about not being able
to restore the brightness level.

Signed-off-by: Mattia Dongili <malattia@linux.it>
Signed-off-by: Len Brown <len.brown@intel.com>
  • Loading branch information
Mattia Dongili authored and Len Brown committed Apr 24, 2009
1 parent 5aa63f0 commit c35d4b3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/platform/x86/sony-laptop.c
Original file line number Diff line number Diff line change
Expand Up @@ -1041,7 +1041,7 @@ static int sony_nc_resume(struct acpi_device *device)

/* set the last requested brightness level */
if (sony_backlight_device &&
!sony_backlight_update_status(sony_backlight_device))
sony_backlight_update_status(sony_backlight_device) < 0)
printk(KERN_WARNING DRV_PFX "unable to restore brightness level\n");

return 0;
Expand Down

0 comments on commit c35d4b3

Please sign in to comment.