On Thu, Jul 12, 2012 at 09:56:40AM -0700, Matthew Dempsky wrote:
> 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?


Yup, there's a need for an else if there. Thanks!

Reply via email to