Re: [PATCH 2/3] asus-wmi: Add dgpu disable method

From: Barnabás Pőcze
Date: Thu Jul 08 2021 - 13:09:46 EST


Hi


2021. július 6., kedd 12:17 keltezéssel, Hans de Goede írta:

> [...]
> >> @@ -2699,6 +2792,10 @@ static int asus_wmi_add(struct platform_device *pdev)
> >> if (err)
> >> goto fail_platform;
> >>
> >> + err = dgpu_disable_check_present(asus);
> >> + if (err)
> >> + goto fail_dgpu_disable;
> >> +
> >
> > Should this really be considered a "fatal" error?
>
> Well dgpu_disable_check_present() does already contain:
>
> if (err == -ENODEV)
> return 0;
>
> IOW it only returns an error on unexpected errors and asus_wmi_add()
> already contains a couple of other foo_present() checks which are
> dealt with in the same way, so this is consistent with that and
> being consistent is good, so I think this is fine.
>

Indeed, that's right, I missed that. I am still unsure whether any error
should cause it to fail to load. But I guess if there is precedent for that
in the module, then consistency is probably better.


Regards,
Barnabás Pőcze