Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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: Markus Elfring <elfring@users.sourceforge.net>
Signed-off-by: Thierry Reding <thierry.reding@gmail.com>

authored by

Markus Elfring and committed by
Thierry Reding
0e1921dc 0527eb37

+1 -3
+1 -3
drivers/pwm/pwm-bfin.c
··· 118 118 int ret; 119 119 120 120 pwm = devm_kzalloc(&pdev->dev, sizeof(*pwm), GFP_KERNEL); 121 - if (!pwm) { 122 - dev_err(&pdev->dev, "failed to allocate memory\n"); 121 + if (!pwm) 123 122 return -ENOMEM; 124 - } 125 123 126 124 platform_set_drvdata(pdev, pwm); 127 125