Merge remote-tracking branch 'iommu/next'
[deliverable/linux.git] / include / net / pkt_cls.h
index c99508d426ccfe8220c992209a35f84589d09906..a459be5fe1c2a937d92253d4f6bfe8e762acd84f 100644 (file)
@@ -69,17 +69,19 @@ struct tcf_exts {
        int police;
 };
 
-static inline void tcf_exts_init(struct tcf_exts *exts, int action, int police)
+static inline int tcf_exts_init(struct tcf_exts *exts, int action, int police)
 {
 #ifdef CONFIG_NET_CLS_ACT
        exts->type = 0;
        exts->nr_actions = 0;
        exts->actions = kcalloc(TCA_ACT_MAX_PRIO, sizeof(struct tc_action *),
                                GFP_KERNEL);
-       WARN_ON(!exts->actions); /* TODO: propagate the error to callers */
+       if (!exts->actions)
+               return -ENOMEM;
 #endif
        exts->action = action;
        exts->police = police;
+       return 0;
 }
 
 /**
This page took 0.026909 seconds and 5 git commands to generate.