aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authorNamjae Jeon <namjae.jeon@samsung.com>2021-05-26 16:40:39 +0900
committerNamjae Jeon <namjae.jeon@samsung.com>2021-05-26 18:13:26 +0900
commita2d6321b459aee5f2b4380271a79668c24165c56 (patch)
tree838c9ac2cbd5a310d4f4dee579691219142f338f
parentcifsd: add the check to prevent potential overflow with smb_strtoUTF16() and UNICODE_LEN() (diff)
downloadwireguard-linux-a2d6321b459aee5f2b4380271a79668c24165c56.tar.xz
wireguard-linux-a2d6321b459aee5f2b4380271a79668c24165c56.zip
cifsd: braces {} should be used on all arms of this statement
Fix "CHECK: braces {} should be used on all arms of this statement" from checkpatch.pl --strict. Signed-off-by: Namjae Jeon <namjae.jeon@samsung.com> Signed-off-by: Steve French <stfrench@microsoft.com>
-rw-r--r--fs/cifsd/asn1.c8
-rw-r--r--fs/cifsd/vfs.c4
2 files changed, 6 insertions, 6 deletions
diff --git a/fs/cifsd/asn1.c b/fs/cifsd/asn1.c
index 769fa328c020..479a9c1fcbbe 100644
--- a/fs/cifsd/asn1.c
+++ b/fs/cifsd/asn1.c
@@ -160,9 +160,9 @@ static void encode_asn_tag(char *buf,
/* insert tag */
buf[index++] = tag;
- if (!hdr_len)
+ if (!hdr_len) {
buf[index++] = len;
- else {
+ } else {
buf[index++] = 0x80 | hdr_len;
for (i = hdr_len - 1; i >= 0; i--)
buf[index++] = (len >> (i * 8)) & 0xFF;
@@ -172,9 +172,9 @@ static void encode_asn_tag(char *buf,
len = len - (index - *ofs);
buf[index++] = seq;
- if (!hdr_len)
+ if (!hdr_len) {
buf[index++] = len;
- else {
+ } else {
buf[index++] = 0x80 | hdr_len;
for (i = hdr_len - 1; i >= 0; i--)
buf[index++] = (len >> (i * 8)) & 0xFF;
diff --git a/fs/cifsd/vfs.c b/fs/cifsd/vfs.c
index cdbb844fddad..e1295b72c410 100644
--- a/fs/cifsd/vfs.c
+++ b/fs/cifsd/vfs.c
@@ -212,9 +212,9 @@ int ksmbd_vfs_mkdir(struct ksmbd_work *work, const char *name, umode_t mode)
mode |= S_IFDIR;
err = vfs_mkdir(&init_user_ns, d_inode(path.dentry), dentry, mode);
- if (err)
+ if (err) {
goto out;
- else if (d_unhashed(dentry)) {
+ } else if (d_unhashed(dentry)) {
struct dentry *d;
d = lookup_one_len(dentry->d_name.name,