Re: [PATCH] asus-laptop: correct error handling in asus_read_brightness()

2016-04-25 Thread Darren Hart
On Fri, Apr 22, 2016 at 10:43:30AM +0300, Giedrius Statkevičius wrote: > On Fri, Apr 22, 2016 at 02:09:22AM +0300, Andy Shevchenko wrote: > > On Sat, Apr 16, 2016 at 3:27 AM, Giedrius Statkevičius > > wrote: > > > It is possible that acpi_evaluate_integer might

Re: [PATCH] asus-laptop: correct error handling in asus_read_brightness()

2016-04-25 Thread Darren Hart
On Fri, Apr 22, 2016 at 10:43:30AM +0300, Giedrius Statkevičius wrote: > On Fri, Apr 22, 2016 at 02:09:22AM +0300, Andy Shevchenko wrote: > > On Sat, Apr 16, 2016 at 3:27 AM, Giedrius Statkevičius > > wrote: > > > It is possible that acpi_evaluate_integer might fail and value would not > > > be

Re: [PATCH] asus-laptop: correct error handling in asus_read_brightness()

2016-04-22 Thread Giedrius Statkevičius
On Fri, Apr 22, 2016 at 02:09:22AM +0300, Andy Shevchenko wrote: > On Sat, Apr 16, 2016 at 3:27 AM, Giedrius Statkevičius > wrote: > > It is possible that acpi_evaluate_integer might fail and value would not be > > set to any value so correct this defect by

Re: [PATCH] asus-laptop: correct error handling in asus_read_brightness()

2016-04-22 Thread Giedrius Statkevičius
On Fri, Apr 22, 2016 at 02:09:22AM +0300, Andy Shevchenko wrote: > On Sat, Apr 16, 2016 at 3:27 AM, Giedrius Statkevičius > wrote: > > It is possible that acpi_evaluate_integer might fail and value would not be > > set to any value so correct this defect by returning 0 in case of an > > error.

Re: [PATCH] asus-laptop: correct error handling in asus_read_brightness()

2016-04-21 Thread Andy Shevchenko
On Sat, Apr 16, 2016 at 3:27 AM, Giedrius Statkevičius wrote: > It is possible that acpi_evaluate_integer might fail and value would not be > set to any value so correct this defect by returning 0 in case of an > error. This is also the correct thing to return

Re: [PATCH] asus-laptop: correct error handling in asus_read_brightness()

2016-04-21 Thread Andy Shevchenko
On Sat, Apr 16, 2016 at 3:27 AM, Giedrius Statkevičius wrote: > It is possible that acpi_evaluate_integer might fail and value would not be > set to any value so correct this defect by returning 0 in case of an > error. This is also the correct thing to return because the backlight > subsystem

[PATCH] asus-laptop: correct error handling in asus_read_brightness()

2016-04-15 Thread Giedrius Statkevičius
It is possible that acpi_evaluate_integer might fail and value would not be set to any value so correct this defect by returning 0 in case of an error. This is also the correct thing to return because the backlight subsystem will print the old value of brightness in this case. Signed-off-by:

[PATCH] asus-laptop: correct error handling in asus_read_brightness()

2016-04-15 Thread Giedrius Statkevičius
It is possible that acpi_evaluate_integer might fail and value would not be set to any value so correct this defect by returning 0 in case of an error. This is also the correct thing to return because the backlight subsystem will print the old value of brightness in this case. Signed-off-by: