Skip to content

Commit

Permalink
pwm: puv3: Delete an error message for a failed memory allocation
Browse files Browse the repository at this point in the history
Omit an extra message for a memory allocation failure in this function.

This issue was detected by using the Coccinelle software.

Signed-off-by: Markus Elfring <[email protected]>
Signed-off-by: Thierry Reding <[email protected]>
  • Loading branch information
elfring authored and thierryreding committed Mar 27, 2018
1 parent d7a131d commit 6106d88
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions drivers/pwm/pwm-puv3.c
Original file line number Diff line number Diff line change
Expand Up @@ -107,10 +107,8 @@ static int pwm_probe(struct platform_device *pdev)
int ret;

puv3 = devm_kzalloc(&pdev->dev, sizeof(*puv3), GFP_KERNEL);
if (puv3 == NULL) {
dev_err(&pdev->dev, "failed to allocate memory\n");
if (!puv3)
return -ENOMEM;
}

puv3->clk = devm_clk_get(&pdev->dev, "OST_CLK");
if (IS_ERR(puv3->clk))
Expand Down

0 comments on commit 6106d88

Please sign in to comment.