Skip to content

Commit

Permalink
crypto: atmel-{aes,sha,tdes} - Drop superfluous error message in probe()
Browse files Browse the repository at this point in the history
In case the probe fails, the device/driver core takes care of printing
the driver name, device name and error code. Drop superfluous error message
at probe.

Signed-off-by: Tudor Ambarus <tudor.ambarus@microchip.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
  • Loading branch information
Tudor Ambarus authored and Herbert Xu committed Dec 11, 2019
1 parent 0efe58f commit c9063a0
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 23 deletions.
15 changes: 4 additions & 11 deletions drivers/crypto/atmel-aes.c
Original file line number Diff line number Diff line change
Expand Up @@ -2595,17 +2595,13 @@ static int atmel_aes_probe(struct platform_device *pdev)
pdata = pdev->dev.platform_data;
if (!pdata) {
pdata = atmel_aes_of_init(pdev);
if (IS_ERR(pdata)) {
err = PTR_ERR(pdata);
goto aes_dd_err;
}
if (IS_ERR(pdata))
return PTR_ERR(pdata);
}

aes_dd = devm_kzalloc(&pdev->dev, sizeof(*aes_dd), GFP_KERNEL);
if (aes_dd == NULL) {
err = -ENOMEM;
goto aes_dd_err;
}
if (!aes_dd)
return -ENOMEM;

aes_dd->dev = dev;

Expand Down Expand Up @@ -2711,9 +2707,6 @@ static int atmel_aes_probe(struct platform_device *pdev)
res_err:
tasklet_kill(&aes_dd->done_task);
tasklet_kill(&aes_dd->queue_task);
aes_dd_err:
if (err != -EPROBE_DEFER)
dev_err(dev, "initialization failed.\n");

return err;
}
Expand Down
8 changes: 2 additions & 6 deletions drivers/crypto/atmel-sha.c
Original file line number Diff line number Diff line change
Expand Up @@ -2734,10 +2734,8 @@ static int atmel_sha_probe(struct platform_device *pdev)
int err;

sha_dd = devm_kzalloc(&pdev->dev, sizeof(*sha_dd), GFP_KERNEL);
if (sha_dd == NULL) {
err = -ENOMEM;
goto sha_dd_err;
}
if (!sha_dd)
return -ENOMEM;

sha_dd->dev = dev;

Expand Down Expand Up @@ -2846,8 +2844,6 @@ static int atmel_sha_probe(struct platform_device *pdev)
res_err:
tasklet_kill(&sha_dd->queue_task);
tasklet_kill(&sha_dd->done_task);
sha_dd_err:
dev_err(dev, "initialization failed.\n");

return err;
}
Expand Down
8 changes: 2 additions & 6 deletions drivers/crypto/atmel-tdes.c
Original file line number Diff line number Diff line change
Expand Up @@ -1240,10 +1240,8 @@ static int atmel_tdes_probe(struct platform_device *pdev)
int err;

tdes_dd = devm_kmalloc(&pdev->dev, sizeof(*tdes_dd), GFP_KERNEL);
if (tdes_dd == NULL) {
err = -ENOMEM;
goto tdes_dd_err;
}
if (!tdes_dd)
return -ENOMEM;

tdes_dd->dev = dev;

Expand Down Expand Up @@ -1352,8 +1350,6 @@ static int atmel_tdes_probe(struct platform_device *pdev)
res_err:
tasklet_kill(&tdes_dd->done_task);
tasklet_kill(&tdes_dd->queue_task);
tdes_dd_err:
dev_err(dev, "initialization failed.\n");

return err;
}
Expand Down

0 comments on commit c9063a0

Please sign in to comment.