Re: [PATCH] platform/x86: dell-laptop: Handle return error form dell_get_intensity.

2017-03-08 Thread Arvind Yadav
Hi, Yes, you are right. I will handle return error correctly. Thanks -Arvind On Wednesday 08 March 2017 06:24 PM, Pali Rohár wrote: Hi! On Wednesday 08 March 2017 17:52:27 Arvind Yadav wrote: Here, dell_get_intensity can return an error. Right. That is truth and we should check for errors.

Re: [PATCH] platform/x86: dell-laptop: Handle return error form dell_get_intensity.

2017-03-08 Thread Arvind Yadav
Hi, Yes, you are right. I will handle return error correctly. Thanks -Arvind On Wednesday 08 March 2017 06:24 PM, Pali Rohár wrote: Hi! On Wednesday 08 March 2017 17:52:27 Arvind Yadav wrote: Here, dell_get_intensity can return an error. Right. That is truth and we should check for errors.

Re: [PATCH] platform/x86: dell-laptop: Handle return error form dell_get_intensity.

2017-03-08 Thread Pali Rohár
Hi! On Wednesday 08 March 2017 17:52:27 Arvind Yadav wrote: > Here, dell_get_intensity can return an error. Right. That is truth and we should check for errors. > So we can assgine props.brightness as max_brightness. But why to max_brightness? Seems that this is incorrect handling of error

Re: [PATCH] platform/x86: dell-laptop: Handle return error form dell_get_intensity.

2017-03-08 Thread Pali Rohár
Hi! On Wednesday 08 March 2017 17:52:27 Arvind Yadav wrote: > Here, dell_get_intensity can return an error. Right. That is truth and we should check for errors. > So we can assgine props.brightness as max_brightness. But why to max_brightness? Seems that this is incorrect handling of error

[PATCH] platform/x86: dell-laptop: Handle return error form dell_get_intensity.

2017-03-08 Thread Arvind Yadav
Here, dell_get_intensity can return an error. So we can assgine props.brightness as max_brightness. This change is done using Coccinelle. Signed-off-by: Arvind Yadav --- drivers/platform/x86/dell-laptop.c | 3 +++ 1 file changed, 3 insertions(+) diff --git

[PATCH] platform/x86: dell-laptop: Handle return error form dell_get_intensity.

2017-03-08 Thread Arvind Yadav
Here, dell_get_intensity can return an error. So we can assgine props.brightness as max_brightness. This change is done using Coccinelle. Signed-off-by: Arvind Yadav --- drivers/platform/x86/dell-laptop.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/platform/x86/dell-laptop.c