Commit dfc4616d authored by Dan Carpenter's avatar Dan Carpenter Committed by Steven Whitehouse

GFS2: alloc_workqueue() doesn't return an ERR_PTR

alloc_workqueue() returns a NULL on error, it doesn't return an ERR_PTR.
Signed-off-by: default avatarDan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: default avatarSteven Whitehouse <swhiteho@redhat.com>
parent 1bc333f4
...@@ -1838,14 +1838,14 @@ int __init gfs2_glock_init(void) ...@@ -1838,14 +1838,14 @@ int __init gfs2_glock_init(void)
glock_workqueue = alloc_workqueue("glock_workqueue", WQ_MEM_RECLAIM | glock_workqueue = alloc_workqueue("glock_workqueue", WQ_MEM_RECLAIM |
WQ_HIGHPRI | WQ_FREEZABLE, 0); WQ_HIGHPRI | WQ_FREEZABLE, 0);
if (IS_ERR(glock_workqueue)) if (!glock_workqueue)
return PTR_ERR(glock_workqueue); return -ENOMEM;
gfs2_delete_workqueue = alloc_workqueue("delete_workqueue", gfs2_delete_workqueue = alloc_workqueue("delete_workqueue",
WQ_MEM_RECLAIM | WQ_FREEZABLE, WQ_MEM_RECLAIM | WQ_FREEZABLE,
0); 0);
if (IS_ERR(gfs2_delete_workqueue)) { if (!gfs2_delete_workqueue) {
destroy_workqueue(glock_workqueue); destroy_workqueue(glock_workqueue);
return PTR_ERR(gfs2_delete_workqueue); return -ENOMEM;
} }
register_shrinker(&glock_shrinker); register_shrinker(&glock_shrinker);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment