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 <sbehr...@giantdisaster.de>
Reported-by: Dan Carpenter <dan.carpen...@oracle.com>
---
 fs/btrfs/check-integrity.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/fs/btrfs/check-integrity.c b/fs/btrfs/check-integrity.c
index 39bfd56a1f26..26f6d34a135b 100644
--- a/fs/btrfs/check-integrity.c
+++ b/fs/btrfs/check-integrity.c
@@ -1093,6 +1093,7 @@ leaf_item_out_of_bounce_error:
                                        next_stack =
                                            btrfsic_stack_frame_alloc();
                                        if (NULL == next_stack) {
+                                               sf->error = -1;
                                                btrfsic_release_block_ctx(
                                                                &sf->
                                                                next_block_ctx);
@@ -1190,8 +1191,10 @@ continue_with_current_node_stack_frame:
                                    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;
-- 
1.9.2

--
To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to