ASoC: es8323: Fix headphone irq err

It's optional, so, do nothing when this gpio-irq omitted.

Signed-off-by: Sugar Zhang <sugar.zhang@rock-chips.com>
Change-Id: If82c6ef3610aa47e1be3266b485305514bb1717d
This commit is contained in:
Sugar Zhang
2021-11-11 21:15:08 +08:00
committed by Tao Huang
parent 4cb725e255
commit a7143c71a5

View File

@@ -988,7 +988,7 @@ static int es8323_i2c_probe(struct i2c_client *i2c,
hp_irq = gpiod_to_irq(es8323->hp_det_gpio);
if (hp_irq) {
if (hp_irq > 0) {
ret = devm_request_threaded_irq(&i2c->dev, hp_irq, NULL,
hp_det_irq_handler,
IRQ_TYPE_EDGE_BOTH |