From: <Tudor.Ambarus@microchip.com>
To: <herbert@gondor.apana.org.au>
Cc: <Nicolas.Ferre@microchip.com>, <alexandre.belloni@bootlin.com>,
<Ludovic.Desroches@microchip.com>, <linux-crypto@vger.kernel.org>,
<linux-arm-kernel@lists.infradead.org>,
<linux-kernel@vger.kernel.org>, <Tudor.Ambarus@microchip.com>
Subject: [PATCH 05/16] crypto: atmel-{aes,sha,tdes} - Drop superfluous error message in probe()
Date: Thu, 5 Dec 2019 09:53:51 +0000 [thread overview]
Message-ID: <20191205095326.5094-6-tudor.ambarus@microchip.com> (raw)
In-Reply-To: <20191205095326.5094-1-tudor.ambarus@microchip.com>
From: Tudor Ambarus <tudor.ambarus@microchip.com>
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>
---
drivers/crypto/atmel-aes.c | 21 ++++++---------------
drivers/crypto/atmel-sha.c | 8 ++------
drivers/crypto/atmel-tdes.c | 8 ++------
3 files changed, 10 insertions(+), 27 deletions(-)
diff --git a/drivers/crypto/atmel-aes.c b/drivers/crypto/atmel-aes.c
index 91092504bc96..1cb5564e73f4 100644
--- a/drivers/crypto/atmel-aes.c
+++ b/drivers/crypto/atmel-aes.c
@@ -2620,22 +2620,16 @@ 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);
}
- if (!pdata->dma_slave) {
- err = -ENXIO;
- goto aes_dd_err;
- }
+ if (!pdata->dma_slave)
+ return -ENXIO;
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;
@@ -2741,9 +2735,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;
}
diff --git a/drivers/crypto/atmel-sha.c b/drivers/crypto/atmel-sha.c
index bf53b8aa8bfc..e85fa48e3d10 100644
--- a/drivers/crypto/atmel-sha.c
+++ b/drivers/crypto/atmel-sha.c
@@ -2756,10 +2756,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;
@@ -2871,8 +2869,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;
}
diff --git a/drivers/crypto/atmel-tdes.c b/drivers/crypto/atmel-tdes.c
index c47ceb593fa4..9baae2065474 100644
--- a/drivers/crypto/atmel-tdes.c
+++ b/drivers/crypto/atmel-tdes.c
@@ -1258,10 +1258,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;
@@ -1373,8 +1371,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;
}
--
2.14.5
next prev parent reply other threads:[~2019-12-05 9:54 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-12-05 9:53 [PATCH 00/16] crypto: atmel - Fixes and cleanup patches Tudor.Ambarus
2019-12-05 9:53 ` [PATCH 01/16] crypto: atmel-tdes: Constify value to write to hw Tudor.Ambarus
2019-12-05 9:53 ` [PATCH 02/16] crypto: atmel-{sha,tdes} - Change algorithm priorities Tudor.Ambarus
2019-12-05 9:53 ` [PATCH 03/16] crypto: atmel-tdes - Remove unused header includes Tudor.Ambarus
2019-12-05 9:53 ` [PATCH 04/16] crypto: atmel-{sha,tdes} - Propagate error from _hw_version_init() Tudor.Ambarus
2019-12-05 9:53 ` Tudor.Ambarus [this message]
2019-12-05 9:53 ` [PATCH 06/16] crypto: atmel-{aes,sha,tdes} - Rename labels in probe() Tudor.Ambarus
2019-12-05 9:53 ` [PATCH 07/16] crypto: atmel-tdes - Remove useless write in Control Register Tudor.Ambarus
2019-12-05 9:53 ` [PATCH 08/16] crypto: atmel-tdes - Map driver data flags to Mode Register Tudor.Ambarus
2019-12-05 9:53 ` [PATCH 09/16] crypto: atmel-tdes - Drop unnecessary passing of tfm Tudor.Ambarus
2019-12-05 9:54 ` [PATCH 10/16] crypto: atmel-{aes,tdes} - Do not save IV for ECB mode Tudor.Ambarus
2019-12-05 9:54 ` [PATCH 11/16] crypto: atmel-aes - Fix counter overflow in CTR mode Tudor.Ambarus
2019-12-05 9:54 ` [PATCH 12/16] crypto: atmel-aes - Fix saving of IV for " Tudor.Ambarus
2019-12-05 9:54 ` [PATCH 13/16] crypto: atmel-{sha,tdes} - Remove unused 'err' member of driver data Tudor.Ambarus
2019-12-05 9:54 ` [PATCH 14/16] crypto: atmel-sha - Void return type for atmel_sha_update_dma_stop() Tudor.Ambarus
2019-12-05 9:54 ` [PATCH 15/16] crypto: atmel-aes - Use gcm helper to check authsize Tudor.Ambarus
2019-12-05 9:54 ` [PATCH 16/16] crypto: atmel-{aes,sha,tdes} - Group common alg type init in dedicated methods Tudor.Ambarus
2019-12-05 13:48 ` [PATCH v2 " Tudor.Ambarus
2019-12-11 9:45 ` [PATCH 00/16] crypto: atmel - Fixes and cleanup patches Herbert Xu
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20191205095326.5094-6-tudor.ambarus@microchip.com \
--to=tudor.ambarus@microchip.com \
--cc=Ludovic.Desroches@microchip.com \
--cc=Nicolas.Ferre@microchip.com \
--cc=alexandre.belloni@bootlin.com \
--cc=herbert@gondor.apana.org.au \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-crypto@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).