lkml.org 
[lkml]   [2021]   [Feb]   [24]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH v2] fs/cifs:simplify the return expression of cifs_swn_auth_info_krb
Date
From: dingsenjie <dingsenjie@yulong.com>

simplify the return expression.

Signed-off-by: dingsenjie <dingsenjie@yulong.com>
---
fs/cifs/cifs_swn.c | 8 +-------
1 file changed, 1 insertion(+), 7 deletions(-)

diff --git a/fs/cifs/cifs_swn.c b/fs/cifs/cifs_swn.c
index d35f599..67b3f4e 100644
--- a/fs/cifs/cifs_swn.c
+++ b/fs/cifs/cifs_swn.c
@@ -34,13 +34,7 @@ struct cifs_swn_reg {

static int cifs_swn_auth_info_krb(struct cifs_tcon *tcon, struct sk_buff *skb)
{
- int ret;
-
- ret = nla_put_flag(skb, CIFS_GENL_ATTR_SWN_KRB_AUTH);
- if (ret < 0)
- return ret;
-
- return 0;
+ return nla_put_flag(skb, CIFS_GENL_ATTR_SWN_KRB_AUTH);
}

static int cifs_swn_auth_info_ntlm(struct cifs_tcon *tcon, struct sk_buff *skb)
--
1.9.1

\
 
 \ /
  Last update: 2021-02-24 08:33    [W:0.027 / U:0.444 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site