提交 6106d888 编写于 作者: M Markus Elfring 提交者: Thierry Reding

pwm: puv3: Delete an error message for a failed memory allocation

Omit an extra message for a memory allocation failure in this function.

This issue was detected by using the Coccinelle software.
Signed-off-by: NMarkus Elfring <elfring@users.sourceforge.net>
Signed-off-by: NThierry Reding <thierry.reding@gmail.com>
上级 d7a131d3
...@@ -107,10 +107,8 @@ static int pwm_probe(struct platform_device *pdev) ...@@ -107,10 +107,8 @@ static int pwm_probe(struct platform_device *pdev)
int ret; int ret;
puv3 = devm_kzalloc(&pdev->dev, sizeof(*puv3), GFP_KERNEL); puv3 = devm_kzalloc(&pdev->dev, sizeof(*puv3), GFP_KERNEL);
if (puv3 == NULL) { if (!puv3)
dev_err(&pdev->dev, "failed to allocate memory\n");
return -ENOMEM; return -ENOMEM;
}
puv3->clk = devm_clk_get(&pdev->dev, "OST_CLK"); puv3->clk = devm_clk_get(&pdev->dev, "OST_CLK");
if (IS_ERR(puv3->clk)) if (IS_ERR(puv3->clk))
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册