Re: [PATCH 1/1] crypto: asymmetric_keys: set error code on failure

2016-12-12 Thread David Howells
Pan Bian wrote: > 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

2016-12-03 Thread Pan Bian
From: Pan Bian In 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: