diff --git a/kernel/workqueue.c b/kernel/workqueue.c index bb9a519cbf5093ece372daa532121f1511957999..ccd1080dd6e7108a9521a0d2ea6d1a9a52c6431c 100644 --- a/kernel/workqueue.c +++ b/kernel/workqueue.c @@ -5337,7 +5337,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; }