Skip to content

Commit

Permalink
GFS2: alloc_workqueue() doesn't return an ERR_PTR
Browse files Browse the repository at this point in the history
alloc_workqueue() returns a NULL on error, it doesn't return an ERR_PTR.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Steven Whitehouse <swhiteho@redhat.com>
  • Loading branch information
Dan Carpenter authored and Steven Whitehouse committed Aug 19, 2013
1 parent 1bc333f commit dfc4616
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions fs/gfs2/glock.c
Original file line number Diff line number Diff line change
Expand Up @@ -1838,14 +1838,14 @@ int __init gfs2_glock_init(void)

glock_workqueue = alloc_workqueue("glock_workqueue", WQ_MEM_RECLAIM |
WQ_HIGHPRI | WQ_FREEZABLE, 0);
if (IS_ERR(glock_workqueue))
return PTR_ERR(glock_workqueue);
if (!glock_workqueue)
return -ENOMEM;
gfs2_delete_workqueue = alloc_workqueue("delete_workqueue",
WQ_MEM_RECLAIM | WQ_FREEZABLE,
0);
if (IS_ERR(gfs2_delete_workqueue)) {
if (!gfs2_delete_workqueue) {
destroy_workqueue(glock_workqueue);
return PTR_ERR(gfs2_delete_workqueue);
return -ENOMEM;
}

register_shrinker(&glock_shrinker);
Expand Down

0 comments on commit dfc4616

Please sign in to comment.