diff options
author | Markus Elfring <elfring@users.sourceforge.net> | 2017-08-11 09:35:33 +0200 |
---|---|---|
committer | Mark Brown <broonie@kernel.org> | 2017-08-14 17:37:20 +0100 |
commit | c7591edc2abd279018abb68aea5bdc604b8f56dd (patch) | |
tree | adc68f41683ac7eb1359635dfab94123b946b1da /sound | |
parent | e7b2e30a3f88b02b13a9bde05044142b38456004 (diff) | |
download | lwn-c7591edc2abd279018abb68aea5bdc604b8f56dd.tar.gz lwn-c7591edc2abd279018abb68aea5bdc604b8f56dd.zip |
ASoC: kirkwood: Delete an error message for a failed memory allocation in kirkwood_i2s_dev_probe()
Omit an extra message for a memory allocation failure in this function.
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')
-rw-r--r-- | sound/soc/kirkwood/kirkwood-i2s.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/sound/soc/kirkwood/kirkwood-i2s.c b/sound/soc/kirkwood/kirkwood-i2s.c index 3b09f71b9535..105a73cc5158 100644 --- a/sound/soc/kirkwood/kirkwood-i2s.c +++ b/sound/soc/kirkwood/kirkwood-i2s.c @@ -538,10 +538,9 @@ static int kirkwood_i2s_dev_probe(struct platform_device *pdev) int err; priv = devm_kzalloc(&pdev->dev, sizeof(*priv), GFP_KERNEL); - if (!priv) { - dev_err(&pdev->dev, "allocation failed\n"); + if (!priv) return -ENOMEM; - } + dev_set_drvdata(&pdev->dev, priv); mem = platform_get_resource(pdev, IORESOURCE_MEM, 0); |