Thread (1 message) 1 message, 1 author, 2017-01-23

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

From: Mark Brown <hidden>
Date: 2017-01-23 18:08:28
Also in: alsa-devel, linux-rockchip

On Mon, Jan 23, 2017 at 11:41:48AM +0100, Romain Perier wrote:

This looks mostly fine but:
quoted hunk
+	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.

Attachments

Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help