Skip to content

Commit 503ec94

Browse files
Dan Carpenteraxboe
authored andcommitted
lightnvm: pblk-gc: fix an error pointer dereference in init
These labels are reversed so we could end up dereferencing an error pointer or leaking. Fixes: 7f347ba6bb3a ("lightnvm: physical block device (pblk) target") Signed-off-by: Dan Carpenter <[email protected]> Signed-off-by: Matias Bjørling <[email protected]> Signed-off-by: Jens Axboe <[email protected]>
1 parent a4bd217 commit 503ec94

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

drivers/lightnvm/pblk-gc.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -527,10 +527,10 @@ int pblk_gc_init(struct pblk *pblk)
527527

528528
return 0;
529529

530-
fail_free_main_kthread:
531-
kthread_stop(gc->gc_ts);
532530
fail_free_writer_kthread:
533531
kthread_stop(gc->gc_writer_ts);
532+
fail_free_main_kthread:
533+
kthread_stop(gc->gc_ts);
534534

535535
return ret;
536536
}

0 commit comments

Comments
 (0)