Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

mmc: atmel-mci: Delete an error message for a failed memory allocation

Omit an extra message for a memory allocation failure.

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: Ulf Hansson <ulf.hansson@linaro.org>

authored by

Markus Elfring and committed by
Ulf Hansson
9b344ba4 b428e712

+1 -3
+1 -3
drivers/mmc/host/atmel-mci.c
··· 660 660 } 661 661 662 662 pdata = devm_kzalloc(&pdev->dev, sizeof(*pdata), GFP_KERNEL); 663 - if (!pdata) { 664 - dev_err(&pdev->dev, "could not allocate memory for pdata\n"); 663 + if (!pdata) 665 664 return ERR_PTR(-ENOMEM); 666 - } 667 665 668 666 for_each_child_of_node(np, cnp) { 669 667 if (of_property_read_u32(cnp, "reg", &slot_id)) {