On Thu, Jul 12, 2012 at 9:48 AM, Paul Irofti <p...@irofti.net> wrote:
> +       if (aml_evalname(sc->sc_acpi, sc->sc_devnode, "_GLK", 0, NULL, &res))
> +               sc->sc_glk = 0;
> +       if (res.type != AML_OBJTYPE_INTEGER)
> +               sc->sc_glk = 0;
> +       else
> +               sc->sc_glk = res.v_integer ? 1 : 0;

The second "if" should be an "else if", no?  Or is res.type guaranteed
to be initialized even if aml_evalname() fails?

Reply via email to