Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 0e1921dc authored by Markus Elfring's avatar Markus Elfring Committed by Thierry Reding
Browse files

pwm: bfin: Remove unneeded error message

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: default avatarMarkus Elfring <elfring@users.sourceforge.net>
Signed-off-by: default avatarThierry Reding <thierry.reding@gmail.com>
parent 0527eb37
Loading
Loading
Loading
Loading
+1 −3
Original line number Diff line number Diff line
@@ -118,10 +118,8 @@ static int bfin_pwm_probe(struct platform_device *pdev)
	int ret;

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

	platform_set_drvdata(pdev, pwm);