From 831eba9c117286066d1afa308c38038cafdac9e4 Mon Sep 17 00:00:00 2001 From: "David S. Miller" Date: Thu, 2 Sep 2004 10:29:47 -0700 Subject: [PATCH] [PKT_SCHED]: Fixed missed return in tcf_hash_init(). Noticed by Andrew Morton. Signed-off-by: David S. Miller --- include/net/pkt_act.h | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/include/net/pkt_act.h b/include/net/pkt_act.h index 09b899d876297..be5d651e4fe36 100644 --- a/include/net/pkt_act.h +++ b/include/net/pkt_act.h @@ -274,11 +274,11 @@ tcf_hash_create(struct tc_st *parm, struct rtattr *est, struct tc_action *a, int static inline struct tcf_st * tcf_hash_init(struct tc_st *parm, struct rtattr *est, struct tc_action *a, int size, int ovr, int bind) { - struct tcf_st *p; - p = tcf_hash_check (parm,a,ovr,bind); - if (NULL == p) { - return tcf_hash_create(parm, est, a, size, ovr, bind); - } + struct tcf_st *p = tcf_hash_check (parm,a,ovr,bind); + + if (!p) + p = tcf_hash_create(parm, est, a, size, ovr, bind); + return p; } #endif -- 2.53.0