diff options
author | Markus Elfring <elfring@users.sourceforge.net> | 2017-06-03 22:46:26 +0300 |
---|---|---|
committer | Robert Jarzmik <robert.jarzmik@free.fr> | 2017-06-14 09:32:21 +0300 |
commit | ce3de60ff92ba5e4d65f1c1ce07460795e3a6157 (patch) | |
tree | 4ca01b35d96a3c080eb4d099e2ce3daddcbbae52 /arch/arm/mach-pxa/pxa3xx-ulpi.c | |
parent | 361f7cc7f33607489bea815f9148e8e9a13ea673 (diff) | |
download | linux-ce3de60ff92ba5e4d65f1c1ce07460795e3a6157.tar.xz |
ARM: pxa: Delete an error message for a failed memory allocation in pxa3xx_u2d_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: Robert Jarzmik <robert.jarzmik@free.fr>
Diffstat (limited to 'arch/arm/mach-pxa/pxa3xx-ulpi.c')
-rw-r--r-- | arch/arm/mach-pxa/pxa3xx-ulpi.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/arch/arm/mach-pxa/pxa3xx-ulpi.c b/arch/arm/mach-pxa/pxa3xx-ulpi.c index 13f9909ac8bf..60cb59a7ebd1 100644 --- a/arch/arm/mach-pxa/pxa3xx-ulpi.c +++ b/arch/arm/mach-pxa/pxa3xx-ulpi.c @@ -287,10 +287,8 @@ static int pxa3xx_u2d_probe(struct platform_device *pdev) int err; u2d = kzalloc(sizeof(*u2d), GFP_KERNEL); - if (!u2d) { - dev_err(&pdev->dev, "failed to allocate memory\n"); + if (!u2d) return -ENOMEM; - } u2d->clk = clk_get(&pdev->dev, NULL); if (IS_ERR(u2d->clk)) { |