提交 ce3de60f 编写于 作者: M Markus Elfring 提交者: Robert Jarzmik

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.pdfSigned-off-by: NMarkus Elfring <elfring@users.sourceforge.net>
Signed-off-by: NRobert Jarzmik <robert.jarzmik@free.fr>
上级 361f7cc7
......@@ -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)) {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册