Re: [PATCH v4 3/4] ASoC: rockchip: Add machine driver for RK3288 boards that use analog/HDMI

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




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


[Index of Archives]     [Device Tree Compilter]     [Device Tree Spec]     [Linux Driver Backports]     [Video for Linux]     [Linux USB Devel]     [Linux PCI Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Yosemite Backpacking]
  Powered by Linux