Skip to content

Commit

Permalink
btrfs: check_int: propagate out-of-memory error upwards
Browse files Browse the repository at this point in the history
This issue was not causing any harm but IMO (and in the opinion of the
static code checker) it is better to propagate this error status upwards.

Signed-off-by: Stefan Behrens <sbehrens@giantdisaster.de>
Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Chris Mason <clm@fb.com>
  • Loading branch information
Stefan Behrens authored and Chris Mason committed Jun 10, 2014
1 parent 61391d5 commit 98806b4
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion fs/btrfs/check-integrity.c
Original file line number Diff line number Diff line change
Expand Up @@ -1093,6 +1093,7 @@ static int btrfsic_process_metablock(
next_stack =
btrfsic_stack_frame_alloc();
if (NULL == next_stack) {
sf->error = -1;
btrfsic_release_block_ctx(
&sf->
next_block_ctx);
Expand Down Expand Up @@ -1190,8 +1191,10 @@ static int btrfsic_process_metablock(
sf->next_block_ctx.datav[0];

next_stack = btrfsic_stack_frame_alloc();
if (NULL == next_stack)
if (NULL == next_stack) {
sf->error = -1;
goto one_stack_frame_backwards;
}

next_stack->i = -1;
next_stack->block = sf->next_block;
Expand Down

0 comments on commit 98806b4

Please sign in to comment.