summaryrefslogtreecommitdiff
path: root/drivers/crypto/atmel-sha204a.c
diff options
context:
space:
mode:
authorUwe Kleine-König <u.kleine-koenig@pengutronix.de>2022-04-28 19:11:46 +0200
committerHerbert Xu <herbert@gondor.apana.org.au>2022-05-06 18:16:55 +0800
commit57182182317aaadb6548f39eeadfe557a24f6a30 (patch)
tree37e9d123c3460e12cd9ce6cb698f3f133da1c3c1 /drivers/crypto/atmel-sha204a.c
parent384e9aa77ae6b0575631ea3100563a9fe44b0e77 (diff)
crypto: atmel-sha204a - Suppress duplicate error message
Returning an error value in an i2c remove callback results in an error message being emitted by the i2c core, but otherwise it doesn't make a difference. The device goes away anyhow and the devm cleanups are called. As atmel_sha204a_remove already emits an error message ant the additional error message by the i2c core doesn't add any useful information, change the return value to zero to suppress this error message. Note that after atmel_sha204a_remove() returns *i2c_priv is freed, so there is trouble ahead because atmel_sha204a_rng_done() might be called after that freeing. So make the error message a bit more frightening. Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Diffstat (limited to 'drivers/crypto/atmel-sha204a.c')
-rw-r--r--drivers/crypto/atmel-sha204a.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/crypto/atmel-sha204a.c b/drivers/crypto/atmel-sha204a.c
index 9f70f4345b12..50363999b990 100644
--- a/drivers/crypto/atmel-sha204a.c
+++ b/drivers/crypto/atmel-sha204a.c
@@ -121,8 +121,8 @@ static int atmel_sha204a_remove(struct i2c_client *client)
struct atmel_i2c_client_priv *i2c_priv = i2c_get_clientdata(client);
if (atomic_read(&i2c_priv->tfm_count)) {
- dev_err(&client->dev, "Device is busy\n");
- return -EBUSY;
+ dev_emerg(&client->dev, "Device is busy, will remove it anyhow\n");
+ return 0;
}
kfree((void *)i2c_priv->hwrng.priv);