Message ID | 20240908134604.3652-1-tangbin@cmss.chinamobile.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | ASoC: codecs: fix the right check and simplify code | expand |
> In the file drivers/base/platform.c, the return description of > platform_get_irq is 'non-zero IRQ number on success, negative > error number on failure.', so the check is wrong, fix it. And > when get irq failed, the function platform_get_irq logs an error > message. 1. You may occasionally put more than 64 characters into text lines of such a change description. 2. How do you think about to split any changes into separate update steps? https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/Documentation/process/submitting-patches.rst?h=v6.11-rc6#n81 3. I find the wording “fix the right check” confusing. Regards, Markus
On Sun, 08 Sep 2024 21:46:04 +0800, Tang Bin wrote: > In the file drivers/base/platform.c, the return description of > platform_get_irq is 'non-zero IRQ number on success, negative > error number on failure.', so the check is wrong, fix it. And > when get irq failed, the function platform_get_irq logs an error > message. > > > [...] Applied to https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git for-next Thanks! [1/1] ASoC: codecs: fix the right check and simplify code commit: 130eb72d3cb38a629205a2a192800b4b1b9bc5c9 All being well this means that it will be integrated into the linux-next tree (usually sometime in the next 24 hours) and sent to Linus during the next merge window (or sooner if it is a bug fix), however if problems are discovered then the patch may be dropped or reverted. You may get further e-mails resulting from automated or manual testing and review of the tree, please engage with people reporting problems and send followup patches addressing any issues that are reported if needed. If any updates are required or you are submitting further changes they should be sent as incremental updates against current git, existing patches will not be replaced. Please add any relevant lists and maintainers to the CCs when replying to this mail. Thanks, Mark
diff --git a/sound/soc/mediatek/mt8365/mt8365-afe-pcm.c b/sound/soc/mediatek/mt8365/mt8365-afe-pcm.c index df6dd8c5b..4ec86b71d 100644 --- a/sound/soc/mediatek/mt8365/mt8365-afe-pcm.c +++ b/sound/soc/mediatek/mt8365/mt8365-afe-pcm.c @@ -2155,11 +2155,11 @@ static int mt8365_afe_pcm_dev_probe(struct platform_device *pdev) for (i = 0; i < afe->irqs_size; i++) afe->irqs[i].irq_data = &irq_data[i]; - irq_id = platform_get_irq(pdev, 0); - if (!irq_id) { - dev_err_probe(afe->dev, irq_id, "np %s no irq\n", afe->dev->of_node->name); - return -ENXIO; - } + ret = platform_get_irq(pdev, 0); + if (ret < 0) + return ret; + + irq_id = ret; ret = devm_request_irq(afe->dev, irq_id, mt8365_afe_irq_handler, 0, "Afe_ISR_Handle", (void *)afe); if (ret)
In the file drivers/base/platform.c, the return description of platform_get_irq is 'non-zero IRQ number on success, negative error number on failure.', so the check is wrong, fix it. And when get irq failed, the function platform_get_irq logs an error message. Fixes: 5e2404493f9f ("ASoC: codecs: add MT6357 support") Signed-off-by: Tang Bin <tangbin@cmss.chinamobile.com> --- sound/soc/mediatek/mt8365/mt8365-afe-pcm.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-)