Skip to content

Commit

Permalink
ARM: pxa: Delete an error message for a failed memory allocation in p…
Browse files Browse the repository at this point in the history
…xa3xx_u2d_probe()

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 <[email protected]>
Signed-off-by: Robert Jarzmik <[email protected]>
  • Loading branch information
elfring authored and rjarzmik committed Jun 14, 2017
1 parent 361f7cc commit ce3de60
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions arch/arm/mach-pxa/pxa3xx-ulpi.c
Original file line number Diff line number Diff line change
Expand Up @@ -287,10 +287,8 @@ static int pxa3xx_u2d_probe(struct platform_device *pdev)
int err;

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

u2d->clk = clk_get(&pdev->dev, NULL);
if (IS_ERR(u2d->clk)) {
Expand Down

0 comments on commit ce3de60

Please sign in to comment.