From 8000c9cd184f2097abdcc0fdfee6ed3641dbd729 Mon Sep 17 00:00:00 2001 From: Marcin Niestroj Date: Tue, 15 Oct 2019 14:08:14 +0200 Subject: [PATCH] net: ppp: lcp: drop dead code path checking nack_buf There is no possibility right now that 'nack == NULL' and 'nack_buf != NULL', so drop code path for that case. Signed-off-by: Marcin Niestroj --- subsys/net/l2/ppp/lcp.c | 4 ---- 1 file changed, 4 deletions(-) diff --git a/subsys/net/l2/ppp/lcp.c b/subsys/net/l2/ppp/lcp.c index c41a46f3d965443..29e87acc285a557 100644 --- a/subsys/net/l2/ppp/lcp.c +++ b/subsys/net/l2/ppp/lcp.c @@ -199,10 +199,6 @@ static int lcp_config_info_req(struct ppp_fsm *fsm, out_of_mem: if (nack) { net_buf_unref(nack); - } else { - if (nack_buf) { - net_buf_unref(nack_buf); - } } return -ENOMEM;