diff mbox series

[3/5] platform/x86: dell-ddv: Replace EIO with ENOMSG

Message ID 20230126194021.381092-4-W_Armin@gmx.de (mailing list archive)
State Handled Elsewhere
Headers show
Series platform/x86: dell-ddv: Various driver updates | expand

Commit Message

Armin Wolf Jan. 26, 2023, 7:40 p.m. UTC
When the ACPI WMI interface returns a valid ACPI object
which has the wrong type, then ENOMSG instead of EIO
should be returned, since the WMI method was still
successfully evaluated.

Signed-off-by: Armin Wolf <W_Armin@gmx.de>
---
 drivers/platform/x86/dell/dell-wmi-ddv.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

--
2.30.2

Comments

Hans de Goede Jan. 30, 2023, 3:06 p.m. UTC | #1
Hi,

On 1/26/23 20:40, Armin Wolf wrote:
> When the ACPI WMI interface returns a valid ACPI object
> which has the wrong type, then ENOMSG instead of EIO
> should be returned, since the WMI method was still
> successfully evaluated.
> 
> Signed-off-by: Armin Wolf <W_Armin@gmx.de>

Thank you for your patch, I've applied this patch to my review-hans 
branch:
https://git.kernel.org/pub/scm/linux/kernel/git/pdx86/platform-drivers-x86.git/log/?h=review-hans

Note it will show up in my review-hans branch once I've pushed my
local branch there, which might take a while.

Once I've run some tests on this branch the patches there will be
added to the platform-drivers-x86/for-next branch and eventually
will be included in the pdx86 pull-request to Linus for the next
merge-window.

Regards,

Hans


> ---
>  drivers/platform/x86/dell/dell-wmi-ddv.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/platform/x86/dell/dell-wmi-ddv.c b/drivers/platform/x86/dell/dell-wmi-ddv.c
> index f99c4cb686fd..58fadb74e86a 100644
> --- a/drivers/platform/x86/dell/dell-wmi-ddv.c
> +++ b/drivers/platform/x86/dell/dell-wmi-ddv.c
> @@ -87,7 +87,7 @@ static int dell_wmi_ddv_query_type(struct wmi_device *wdev, enum dell_ddv_method
> 
>  	if (obj->type != type) {
>  		kfree(obj);
> -		return -EIO;
> +		return -ENOMSG;
>  	}
> 
>  	*result = obj;
> --
> 2.30.2
>
diff mbox series

Patch

diff --git a/drivers/platform/x86/dell/dell-wmi-ddv.c b/drivers/platform/x86/dell/dell-wmi-ddv.c
index f99c4cb686fd..58fadb74e86a 100644
--- a/drivers/platform/x86/dell/dell-wmi-ddv.c
+++ b/drivers/platform/x86/dell/dell-wmi-ddv.c
@@ -87,7 +87,7 @@  static int dell_wmi_ddv_query_type(struct wmi_device *wdev, enum dell_ddv_method

 	if (obj->type != type) {
 		kfree(obj);
-		return -EIO;
+		return -ENOMSG;
 	}

 	*result = obj;