Skip to content

Commit

Permalink
mfd: ti_am335x_tscadc: Delete an error message for a failed memory al…
Browse files Browse the repository at this point in the history
…location in ti_tscadc_probe()

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: Lee Jones <[email protected]>
  • Loading branch information
elfring authored and Lee Jones committed May 16, 2018
1 parent 8349aeb commit a2e87fe
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions drivers/mfd/ti_am335x_tscadc.c
Original file line number Diff line number Diff line change
Expand Up @@ -169,10 +169,9 @@ static int ti_tscadc_probe(struct platform_device *pdev)

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

tscadc->dev = &pdev->dev;

err = platform_get_irq(pdev, 0);
Expand Down

0 comments on commit a2e87fe

Please sign in to comment.