mmc: atmel-mci: Delete an error message for a failed memory allocation
authorMarkus Elfring <elfring@users.sourceforge.net>
Sat, 13 May 2017 13:05:28 +0000 (15:05 +0200)
committerUlf Hansson <ulf.hansson@linaro.org>
Tue, 20 Jun 2017 08:30:20 +0000 (10:30 +0200)
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>
drivers/mmc/host/atmel-mci.c

index 2e96d964f5823fd1b94c1de04fd9cda8c82d5760..97de2d32ba84119a1f0907d3ac12e29c9a371232 100644 (file)
@@ -660,10 +660,8 @@ atmci_of_init(struct platform_device *pdev)
        }
 
        pdata = devm_kzalloc(&pdev->dev, sizeof(*pdata), GFP_KERNEL);
-       if (!pdata) {
-               dev_err(&pdev->dev, "could not allocate memory for pdata\n");
+       if (!pdata)
                return ERR_PTR(-ENOMEM);
-       }
 
        for_each_child_of_node(np, cnp) {
                if (of_property_read_u32(cnp, "reg", &slot_id)) {