Skip to content

Commit

Permalink
ASoC: meson: aiu: fix irq registration
Browse files Browse the repository at this point in the history
The aiu stored the irq in an unsigned integer which may have discarded an
error returned by platform_get_irq_byname(). This is incorrect and should
have been a signed integer.

Also drop the irq error traces from the probe function as this is already
done by platform_get_irq_byname().

Fixes: 6ae9ca9 ("ASoC: meson: aiu: add i2s and spdif support")
Reported-by: kbuild test robot <lkp@intel.com>
Signed-off-by: Jerome Brunet <jbrunet@baylibre.com>
Link: https://lore.kernel.org/r/20200214131350.337968-4-jbrunet@baylibre.com
Signed-off-by: Mark Brown <broonie@kernel.org>
  • Loading branch information
Jerome Brunet authored and Mark Brown committed Feb 14, 2020
1 parent 269f001 commit 6e700f0
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 7 deletions.
8 changes: 2 additions & 6 deletions sound/soc/meson/aiu.c
Original file line number Diff line number Diff line change
Expand Up @@ -314,16 +314,12 @@ static int aiu_probe(struct platform_device *pdev)
}

aiu->i2s.irq = platform_get_irq_byname(pdev, "i2s");
if (aiu->i2s.irq < 0) {
dev_err(dev, "Can't get i2s irq\n");
if (aiu->i2s.irq < 0)
return aiu->i2s.irq;
}

aiu->spdif.irq = platform_get_irq_byname(pdev, "spdif");
if (aiu->spdif.irq < 0) {
dev_err(dev, "Can't get spdif irq\n");
if (aiu->spdif.irq < 0)
return aiu->spdif.irq;
}

ret = aiu_clk_get(dev);
if (ret)
Expand Down
2 changes: 1 addition & 1 deletion sound/soc/meson/aiu.h
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ enum aiu_clk_ids {
struct aiu_interface {
struct clk_bulk_data *clks;
unsigned int clk_num;
unsigned int irq;
int irq;
};

struct aiu {
Expand Down

0 comments on commit 6e700f0

Please sign in to comment.