OpenCloudOS-Kernel/sound/soc/mediatek
Stephen Boyd cf9441adb1
ASoC: Remove dev_err() usage after platform_get_irq()
We don't need dev_err() messages when platform_get_irq() fails now that
platform_get_irq() prints an error message itself when something goes
wrong. Let's remove these prints with a simple semantic patch.

// <smpl>
@@
expression ret;
struct platform_device *E;
@@

ret =
(
platform_get_irq(E, ...)
|
platform_get_irq_byname(E, ...)
);

if ( \( ret < 0 \| ret <= 0 \) )
{
(
-if (ret != -EPROBE_DEFER)
-{ ...
-dev_err(...);
-... }
|
...
-dev_err(...);
)
...
}
// </smpl>

While we're here, remove braces on if statements that only have one
statement (manually).

Cc: Liam Girdwood <lgirdwood@gmail.com>
Cc: Mark Brown <broonie@kernel.org>
Cc: Jaroslav Kysela <perex@perex.cz>
Cc: Takashi Iwai <tiwai@suse.com>
Cc: alsa-devel@alsa-project.org
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Stephen Boyd <swboyd@chromium.org>
Link: https://lore.kernel.org/r/20190730181557.90391-50-swboyd@chromium.org
Signed-off-by: Mark Brown <broonie@kernel.org>
2019-08-02 12:12:31 +01:00
..
common ASoC: Remove dev_err() usage after platform_get_irq() 2019-08-02 12:12:31 +01:00
mt2701 ASoC: Remove dev_err() usage after platform_get_irq() 2019-08-02 12:12:31 +01:00
mt6797 ASoC: mt6797: use devm_platform_ioremap_resource() to simplify code 2019-07-31 12:04:29 +01:00
mt8173 ASoC: Remove dev_err() usage after platform_get_irq() 2019-08-02 12:12:31 +01:00
mt8183 ASoC: mediatek: mt8183: make headset codec optional 2019-07-22 13:26:12 +01:00
Kconfig sound fixes for 5.2-rc5 2019-06-14 05:37:06 -10:00
Makefile ASoC: mediatek: mt8183: add platform driver 2019-01-25 18:05:10 +00:00