From 4a10e55f47e4e9310d968f3756a0b66dc65158c9 Mon Sep 17 00:00:00 2001 From: "Jason A. Donenfeld" Date: Tue, 4 Sep 2018 11:18:09 -0600 Subject: global: always find OOM unlikely Suggested-by: Sultan Alsawaf Signed-off-by: Jason A. Donenfeld --- src/netlink.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/netlink.c') diff --git a/src/netlink.c b/src/netlink.c index 98848c9..0bd2b97 100644 --- a/src/netlink.c +++ b/src/netlink.c @@ -175,9 +175,9 @@ static int get_device_start(struct netlink_callback *cb) if (ret < 0) return ret; - cb->args[2] = - (long)kzalloc(sizeof(struct allowedips_cursor), GFP_KERNEL); - if (!cb->args[2]) + cb->args[2] = (long)kzalloc(sizeof(struct allowedips_cursor), + GFP_KERNEL); + if (unlikely(!cb->args[2])) return -ENOMEM; wg = lookup_interface(attrs, cb->skb); if (IS_ERR(wg)) { -- cgit v1.2.3