• Uwe Kleine-König's avatar
    crypto: keembay - Don't pass errors to the caller in .remove() · 0eb85cb3
    Uwe Kleine-König authored
    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: default avatarUwe Kleine-König <u.kleine-koenig@pengutronix.de>
    Signed-off-by: default avatarHerbert Xu <herbert@gondor.apana.org.au>
    0eb85cb3
keembay-ocs-hcu-core.c 33.2 KB