Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 228cd2db authored by Kangjie Lu's avatar Kangjie Lu Committed by David S. Miller
Browse files

net: strparser: fix a missing check for create_singlethread_workqueue



In case create_singlethread_workqueue fails, the check returns
an error to callers to avoid potential NULL pointer dereferences.

Signed-off-by: default avatarKangjie Lu <kjlu@umn.edu>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 68cfe9a2
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -550,6 +550,8 @@ EXPORT_SYMBOL_GPL(strp_check_rcv);
static int __init strp_mod_init(void)
{
	strp_wq = create_singlethread_workqueue("kstrp");
	if (unlikely(!strp_wq))
		return -ENOMEM;

	return 0;
}