]> git.baikalelectronics.ru Git - kernel.git/commit
crypto: atmel-sha204a - Suppress duplicate error message
authorUwe Kleine-König <u.kleine-koenig@pengutronix.de>
Thu, 28 Apr 2022 17:11:46 +0000 (19:11 +0200)
committerHerbert Xu <herbert@gondor.apana.org.au>
Fri, 6 May 2022 10:16:55 +0000 (18:16 +0800)
commit445635e34cdac23fe28cf5be5cbb22e23ca2b824
tree37e9d123c3460e12cd9ce6cb698f3f133da1c3c1
parentdbbc5ad0478629549c45c95f96b00108a0564bea
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>
drivers/crypto/atmel-sha204a.c