crypto: keembay - Don't pass errors to the caller in .remove()
authorUwe Kleine-König <u.kleine-koenig@pengutronix.de>
Sat, 23 Sep 2023 10:08:05 +0000 (12:08 +0200)
committerHerbert Xu <herbert@gondor.apana.org.au>
Sun, 1 Oct 2023 08:28:15 +0000 (16:28 +0800)
commit0eb85cb3c8a78a5df09d8f91a246d5d068160b74
treeadaff89e9a19445786c142dc9e86596dfeb3d337
parent141f12be09ac693e2384a7999f6782c7750c30a5
crypto: keembay - Don't pass errors to the caller in .remove()

Returning an error code in the remove function of a platform device has
no effect (compared to returning zero) apart from an error message, that
the error is ignored. Then the device is removed irrespective of the
returned value.

As kmb_ocs_hcu_remove is only called after kmb_ocs_hcu_probe() returned
successfully, platform_get_drvdata() never returns NULL and so the
respective check can just be dropped.

crypto_engine_exit() might return an error code but already emits an
error message in that case, so better return zero in
kmb_ocs_hcu_remove() even in this case to suppress another error
message. All other crypto drivers also ignore the return value of
crypto_engine_exit().

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
drivers/crypto/intel/keembay/keembay-ocs-hcu-core.c