• Herbert Xu's avatar
    crypto: rng - Count error stats differently · 9807e49b
    Herbert Xu authored
    Move all stat code specific to rng into the rng code.
    
    While we're at it, change the stats so that bytes and counts
    are always incremented even in case of error.  This allows the
    reference counting to be removed as we can now increment the
    counters prior to the operation.
    
    After the operation we simply increase the error count if necessary.
    This is safe as errors can only occur synchronously (or rather,
    the existing code already ignored asynchronous errors which are
    only visible to the callback function).
    Signed-off-by: default avatarHerbert Xu <herbert@gondor.apana.org.au>
    9807e49b
rng.h 7.72 KB