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>
This commit is contained in:
parent
0527eb3723
commit
0e1921dcd8
|
@ -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);
|
||||
|
||||
|
|
Loading…
Reference in New Issue