File tree Expand file tree Collapse file tree 1 file changed +8
-4
lines changed
drivers/md/persistent-data Expand file tree Collapse file tree 1 file changed +8
-4
lines changed Original file line number Diff line number Diff line change @@ -917,23 +917,27 @@ static int load_ablock(struct dm_array_cursor *c)
917917 if (c -> block )
918918 unlock_ablock (c -> info , c -> block );
919919
920- c -> block = NULL ;
921- c -> ab = NULL ;
922920 c -> index = 0 ;
923921
924922 r = dm_btree_cursor_get_value (& c -> cursor , & key , & value_le );
925923 if (r ) {
926924 DMERR ("dm_btree_cursor_get_value failed" );
927- dm_btree_cursor_end ( & c -> cursor ) ;
925+ goto out ;
928926
929927 } else {
930928 r = get_ablock (c -> info , le64_to_cpu (value_le ), & c -> block , & c -> ab );
931929 if (r ) {
932930 DMERR ("get_ablock failed" );
933- dm_btree_cursor_end ( & c -> cursor ) ;
931+ goto out ;
934932 }
935933 }
936934
935+ return 0 ;
936+
937+ out :
938+ dm_btree_cursor_end (& c -> cursor );
939+ c -> block = NULL ;
940+ c -> ab = NULL ;
937941 return r ;
938942}
939943
You can’t perform that action at this time.
0 commit comments