crypto: sha256-generic - move to generic glue implementation
[cascardo/linux.git] / crypto / ansi_cprng.c
index 6f5bebc..765fe76 100644 (file)
@@ -210,7 +210,11 @@ static int get_prng_bytes(char *buf, size_t nbytes, struct prng_context *ctx,
                byte_count = DEFAULT_BLK_SZ;
        }
 
-       err = byte_count;
+       /*
+        * Return 0 in case of success as mandated by the kernel
+        * crypto API interface definition.
+        */
+       err = 0;
 
        dbgprint(KERN_CRIT "getting %d random bytes for context %p\n",
                byte_count, ctx);