On Mon, Jan 23, 2017 at 11:41:48AM +0100, Romain Perier wrote: This looks mostly fine but: > + machine->gpio_hp_det = of_get_named_gpio(np, > + "rockchip,hp-det-gpios", 0); > + if (machine->gpio_hp_det == -EPROBE_DEFER) > + return -EPROBE_DEFER; Rather than explicitly checking for probe defer here it's better to check for the error code that indicates there's nothing to find (-ENODEV IIRC but I might be misremembering for GPIO). That way if there's some actual error like running out of memory allocating some structure that's required then we'll not just silently ignore it.
Attachment:
signature.asc
Description: PGP signature