Skip to content

Commit e34e6f8

Browse files
rtg-canonicalAndreas Gruenbacher
authored andcommitted
gfs2: Fix unused value warning in do_gfs2_set_flags()
Coverity complains of an unused value: CID 119623 (#1 of 1): Unused value (UNUSED_VALUE) assigned_value: Assigning value -1 to error here, but that stored value is overwritten before it can be used. 237 error = -EPERM; Fix it by removing the assignment. Signed-off-by: Tim Gardner <tim.gardner@canonical.com> Signed-off-by: Andreas Gruenbacher <agruenba@redhat.com>
1 parent 660a612 commit e34e6f8

1 file changed

Lines changed: 0 additions & 1 deletion

File tree

fs/gfs2/file.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -234,7 +234,6 @@ static int do_gfs2_set_flags(struct inode *inode, u32 reqflags, u32 mask)
234234
if ((new_flags ^ flags) == 0)
235235
goto out;
236236

237-
error = -EPERM;
238237
if (!IS_IMMUTABLE(inode)) {
239238
error = gfs2_permission(&init_user_ns, inode, MAY_WRITE);
240239
if (error)

0 commit comments

Comments
 (0)