Skip to content
Commit 4f55dc2a authored by Tom Rix's avatar Tom Rix Committed by Jaegeuk Kim
Browse files

f2fs: return success if there is no work to do



Static analysis reports this problem
file.c:3206:2: warning: Undefined or garbage value returned to caller
        return err;
        ^~~~~~~~~~

err is only set if there is some work to do.  Because the loop returns
immediately on an error, if all the work was done, a 0 would be returned.
Instead of checking the unlikely case that there was no work to do,
change the return of err to 0.

Signed-off-by: default avatarTom Rix <trix@redhat.com>
Signed-off-by: default avatarJaegeuk Kim <jaegeuk@kernel.org>
parent 91f0fb69
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment