diff options
author | Markus Elfring <elfring@users.sourceforge.net> | 2017-05-13 15:05:28 +0200 |
---|---|---|
committer | Ulf Hansson <ulf.hansson@linaro.org> | 2017-06-20 10:30:20 +0200 |
commit | 9b344ba4205ee19dec1a57dd7bdc38473336e19e (patch) | |
tree | 26f0b1e70733bcb2c499c5d977ca1497db0c20e1 /drivers/mmc | |
parent | mmc: queue: delete mmc_req_is_special() (diff) | |
download | linux-9b344ba4205ee19dec1a57dd7bdc38473336e19e.tar.xz linux-9b344ba4205ee19dec1a57dd7bdc38473336e19e.zip |
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>
Diffstat (limited to 'drivers/mmc')
-rw-r--r-- | drivers/mmc/host/atmel-mci.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/drivers/mmc/host/atmel-mci.c b/drivers/mmc/host/atmel-mci.c index 2e96d964f582..97de2d32ba84 100644 --- a/drivers/mmc/host/atmel-mci.c +++ b/drivers/mmc/host/atmel-mci.c @@ -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)) { |