summaryrefslogtreecommitdiff
path: root/fs/ubifs/sysfs.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/ubifs/sysfs.c')
-rw-r--r--fs/ubifs/sysfs.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/ubifs/sysfs.c b/fs/ubifs/sysfs.c
index 0eb3d7d12450..7acc5a74e5fa 100644
--- a/fs/ubifs/sysfs.c
+++ b/fs/ubifs/sysfs.c
@@ -100,7 +100,7 @@ int ubifs_sysfs_register(struct ubifs_info *c)
n = snprintf(dfs_dir_name, UBIFS_DFS_DIR_LEN + 1, UBIFS_DFS_DIR_NAME,
c->vi.ubi_num, c->vi.vol_id);
- if (n == UBIFS_DFS_DIR_LEN) {
+ if (n > UBIFS_DFS_DIR_LEN) {
/* The array size is too small */
ret = -EINVAL;
goto out_free;