Messages in this thread | | | From | David Howells <> | Subject | Re: [PATCH 1/1] crypto: asymmetric_keys: set error code on failure | Date | Mon, 12 Dec 2016 16:10:18 +0000 |
| |
Pan Bian <bianpan201602@163.com> 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 = -ENOMEM; outlen = crypto_akcipher_maxsize(tfm); output = kmalloc(outlen, GFP_KERNEL); if (!output) goto error_free_req;
I'll alter your patch.
David
| |