diff options
author | Markus Elfring <elfring@users.sourceforge.net> | 2017-08-10 17:13:19 +0200 |
---|---|---|
committer | Mark Brown <broonie@kernel.org> | 2017-08-10 17:32:38 +0200 |
commit | 0d7820d0918efa6c2a53acdfc47cbfc3b48df727 (patch) | |
tree | 7e6d9d94b01ec220cfca2f35671a4c14d02cc481 /sound/soc/sh/rcar/gen.c | |
parent | ASoC: rsnd: call request_irq/free_irq once in MIX case (diff) | |
download | linux-0d7820d0918efa6c2a53acdfc47cbfc3b48df727.tar.xz linux-0d7820d0918efa6c2a53acdfc47cbfc3b48df727.zip |
ASoC: rsnd: Delete an error message for a failed memory allocation in three functions
Omit an extra message for a memory allocation failure in these functions.
This issue was detected by using the Coccinelle software.
Link: http://events.linuxfoundation.org/sites/events/files/slides/LCJ16-Refactor_Strings-WSang_0.pdf
Signed-off-by: Markus Elfring <elfring@users.sourceforge.net>
Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'sound/soc/sh/rcar/gen.c')
-rw-r--r-- | sound/soc/sh/rcar/gen.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/sound/soc/sh/rcar/gen.c b/sound/soc/sh/rcar/gen.c index ee00e3516911..f04c4100043a 100644 --- a/sound/soc/sh/rcar/gen.c +++ b/sound/soc/sh/rcar/gen.c @@ -406,10 +406,8 @@ int rsnd_gen_probe(struct rsnd_priv *priv) int ret; gen = devm_kzalloc(dev, sizeof(*gen), GFP_KERNEL); - if (!gen) { - dev_err(dev, "GEN allocate failed\n"); + if (!gen) return -ENOMEM; - } priv->gen = gen; |