Re: [PATCH 1/1] crypto: asymmetric_keys: set error code on failure
Pan Bianwrote: > outlen = crypto_akcipher_maxsize(tfm); > output = kmalloc(outlen, GFP_KERNEL); > - if (!output) > + if (!output) { > + ret = -ENOMEM; > goto error_free_req; > + } This is preferred: + ret =
[PATCH 1/1] crypto: asymmetric_keys: set error code on failure
From: Pan BianIn function public_key_verify_signature(), returns variable ret on error paths. When the call to kmalloc() fails, the value of ret is 0, and it is not set to an errno before returning. This patch fixes the bug. Bugzilla: