From: Markus Elfring Date: Thu, 10 Aug 2017 16:18:20 +0000 (+0200) Subject: ASoC: fsi: Delete an error message for a failed memory allocation in fsi_probe() X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=dd80627d0688709a77233787a9c9d7e1f8e419ac;p=GitHub%2FLineageOS%2Fandroid_kernel_motorola_exynos9610.git ASoC: fsi: Delete an error message for a failed memory allocation in fsi_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 Signed-off-by: Mark Brown --- diff --git a/sound/soc/sh/fsi.c b/sound/soc/sh/fsi.c index 005b21506556..1f41cf1ff830 100644 --- a/sound/soc/sh/fsi.c +++ b/sound/soc/sh/fsi.c @@ -1962,10 +1962,8 @@ static int fsi_probe(struct platform_device *pdev) } master = devm_kzalloc(&pdev->dev, sizeof(*master), GFP_KERNEL); - if (!master) { - dev_err(&pdev->dev, "Could not allocate master\n"); + if (!master) return -ENOMEM; - } master->base = devm_ioremap_nocache(&pdev->dev, res->start, resource_size(res));