diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2018-03-19 15:13:04 -0700 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2018-03-19 15:13:04 -0700 |
commit | c6256ca9c011db79cca6b7a3a659389ff217e0bd (patch) | |
tree | 68c08077361b67b4e2eed09b4f32c74e8926c242 /kernel | |
parent | 0d707a2f24c4a962313cffc980e2d74df460e45a (diff) | |
parent | 6417250d3f894e66a68ba1cd93676143f2376a6f (diff) |
Merge branch 'for-4.16-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/wq
Pull workqueue fixes from Tejun Heo:
"Two low-impact workqueue commits.
One fixes workqueue creation error path and the other removes the
unused cancel_work()"
* 'for-4.16-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/wq:
workqueue: remove unused cancel_work()
workqueue: use put_device() instead of kfree()
Diffstat (limited to 'kernel')
-rw-r--r-- | kernel/workqueue.c | 10 |
1 files changed, 1 insertions, 9 deletions
diff --git a/kernel/workqueue.c b/kernel/workqueue.c index bb9a519cbf50..6ec6ba65127b 100644 --- a/kernel/workqueue.c +++ b/kernel/workqueue.c @@ -3018,14 +3018,6 @@ static bool __cancel_work(struct work_struct *work, bool is_dwork) return ret; } -/* - * See cancel_delayed_work() - */ -bool cancel_work(struct work_struct *work) -{ - return __cancel_work(work, false); -} - /** * cancel_delayed_work - cancel a delayed work * @dwork: delayed_work to cancel @@ -5337,7 +5329,7 @@ int workqueue_sysfs_register(struct workqueue_struct *wq) ret = device_register(&wq_dev->dev); if (ret) { - kfree(wq_dev); + put_device(&wq_dev->dev); wq->wq_dev = NULL; return ret; } |