Skip to content

Commit

Permalink
hwrng: xgene - Delete an error message in xgene_rng_probe()
Browse files Browse the repository at this point in the history
The function “platform_get_irq” can log an error already.
Thus omit a redundant message for the exception handling in the
calling function.

This issue was detected by using the Coccinelle software.

Signed-off-by: Markus Elfring <[email protected]>
Signed-off-by: Herbert Xu <[email protected]>
  • Loading branch information
elfring authored and herbertx committed Apr 16, 2020
1 parent b111418 commit f72fed8
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions drivers/char/hw_random/xgene-rng.c
Original file line number Diff line number Diff line change
Expand Up @@ -328,10 +328,8 @@ static int xgene_rng_probe(struct platform_device *pdev)
return PTR_ERR(ctx->csr_base);

rc = platform_get_irq(pdev, 0);
if (rc < 0) {
dev_err(&pdev->dev, "No IRQ resource\n");
if (rc < 0)
return rc;
}
ctx->irq = rc;

dev_dbg(&pdev->dev, "APM X-Gene RNG BASE %p ALARM IRQ %d",
Expand Down

0 comments on commit f72fed8

Please sign in to comment.