Re: [PATCH 21/21] ASoC: rt5514-spi: Free the DSP context on component remove
From: Mark Brown
Date: Mon Sep 21 2026 - 10:12:56 EST
On Mon, Sep 21, 2026 at 07:46:40PM +0900, Chancel Liu wrote:
> if (rt5514_spi->irq) {
> - ret = devm_request_threaded_irq(&rt5514_spi->dev,
> - rt5514_spi->irq, NULL, rt5514_spi_irq,
> - IRQF_TRIGGER_RISING | IRQF_ONESHOT, "rt5514-spi",
> - rt5514_dsp);
> - if (ret)
> + ret = request_threaded_irq(rt5514_spi->irq, NULL,
> + rt5514_spi_irq,
> + IRQF_TRIGGER_RISING | IRQF_ONESHOT,
> + "rt5514-spi", rt5514_dsp);
> + if (ret) {
> dev_err(&rt5514_spi->dev,
> "%s Failed to request IRQ: %d\n", __func__,
> ret);
> - else
> - device_init_wakeup(rt5514_dsp->dev, true);
> + kfree(rt5514_dsp);
> + return ret;
> + }
> +
> + device_init_wakeup(rt5514_dsp->dev, true);
Previously we would ignore the error and carry on without the IRQ, now
we pay attention. I don't know if the device actually worked or not.
Attachment:
signature.asc
Description: PGP signature