Skip to content

Commit

Permalink
mfd: jz4740-adc: Delete error message for a failed memory allocation
Browse files Browse the repository at this point in the history
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 292155b commit 17963b5
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions drivers/mfd/jz4740-adc.c
Original file line number Diff line number Diff line change
Expand Up @@ -212,10 +212,8 @@ static int jz4740_adc_probe(struct platform_device *pdev)
int irq_base;

adc = devm_kzalloc(&pdev->dev, sizeof(*adc), GFP_KERNEL);
if (!adc) {
dev_err(&pdev->dev, "Failed to allocate driver structure\n");
if (!adc)
return -ENOMEM;
}

adc->irq = platform_get_irq(pdev, 0);
if (adc->irq < 0) {
Expand Down

0 comments on commit 17963b5

Please sign in to comment.