[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20170415185553.16098-18-matias@cnexlabs.com>
Date: Sat, 15 Apr 2017 20:55:51 +0200
From: Matias Bjørling <matias@...xlabs.com>
To: <axboe@...com>
CC: <linux-block@...r.kernel.org>, <linux-kernel@...r.kernel.org>,
Dan Carpenter <dan.carpenter@...cle.com>,
Matias Bjørling <matias@...xlabs.com>
Subject: [GIT PULL 17/19] lightnvm: pblk-gc: fix an error pointer dereference in init
From: Dan Carpenter <dan.carpenter@...cle.com>
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 <dan.carpenter@...cle.com>
Signed-off-by: Matias Bjørling <matias@...xlabs.com>
---
drivers/lightnvm/pblk-gc.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/lightnvm/pblk-gc.c b/drivers/lightnvm/pblk-gc.c
index 9b147cf..f173fd4 100644
--- a/drivers/lightnvm/pblk-gc.c
+++ b/drivers/lightnvm/pblk-gc.c
@@ -527,10 +527,10 @@ int pblk_gc_init(struct pblk *pblk)
return 0;
-fail_free_main_kthread:
- kthread_stop(gc->gc_ts);
fail_free_writer_kthread:
kthread_stop(gc->gc_writer_ts);
+fail_free_main_kthread:
+ kthread_stop(gc->gc_ts);
return ret;
}
--
2.9.3
Powered by blists - more mailing lists