* [PATCH 06/24] crypt: return actual error code on pcrypt_init
@ 2014-06-17 14:29 Jeff Liu
2014-06-17 19:24 ` Greg KH
0 siblings, 1 reply; 2+ messages in thread
From: Jeff Liu @ 2014-06-17 14:29 UTC (permalink / raw)
To: herbert, davem; +Cc: linux-crypto, LKML
From: Jie Liu <jeff.liu@oracle.com>
Return the actual error code if call kset_create_and_add() failed
Cc: Herbert Xu <herbert@gondor.apana.org.au>
Cc: David S. Miller" <davem@davemloft.net>
Signed-off-by: Jie Liu <jeff.liu@oracle.com>
---
crypto/pcrypt.c | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/crypto/pcrypt.c b/crypto/pcrypt.c
index 309d345..053fb10 100644
--- a/crypto/pcrypt.c
+++ b/crypto/pcrypt.c
@@ -523,11 +523,13 @@ static struct crypto_template pcrypt_tmpl = {
static int __init pcrypt_init(void)
{
- int err = -ENOMEM;
+ int err;
pcrypt_kset = kset_create_and_add("pcrypt", NULL, kernel_kobj);
- if (!pcrypt_kset)
+ if (IS_ERR(pcrypt_kset)) {
+ err = PTR_ERR(pcrypt_kset);
goto err;
+ }
err = pcrypt_init_padata(&pencrypt, "pencrypt");
if (err)
--
1.8.3.2
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH 06/24] crypt: return actual error code on pcrypt_init
2014-06-17 14:29 [PATCH 06/24] crypt: return actual error code on pcrypt_init Jeff Liu
@ 2014-06-17 19:24 ` Greg KH
0 siblings, 0 replies; 2+ messages in thread
From: Greg KH @ 2014-06-17 19:24 UTC (permalink / raw)
To: Jeff Liu; +Cc: herbert, davem, linux-crypto, LKML
On Tue, Jun 17, 2014 at 10:29:02PM +0800, Jeff Liu wrote:
> From: Jie Liu <jeff.liu@oracle.com>
>
> Return the actual error code if call kset_create_and_add() failed
>
> Cc: Herbert Xu <herbert@gondor.apana.org.au>
> Cc: David S. Miller" <davem@davemloft.net>
> Signed-off-by: Jie Liu <jeff.liu@oracle.com>
> ---
> crypto/pcrypt.c | 6 ++++--
> 1 file changed, 4 insertions(+), 2 deletions(-)
Herbert and David, please do not take this patch, it is incorrect.
thanks,
greg k-h
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2014-06-17 19:21 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-06-17 14:29 [PATCH 06/24] crypt: return actual error code on pcrypt_init Jeff Liu
2014-06-17 19:24 ` Greg KH
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).