route/tc: remove unnecessary check for tc_kind member of struct rtnl_tc
authorTobias Klauser <tklauser@distanz.ch>
Tue, 28 Apr 2015 11:36:40 +0000 (13:36 +0200)
committerThomas Haller <thaller@redhat.com>
Tue, 5 May 2015 14:14:20 +0000 (16:14 +0200)
The tc_kind member of struct rtnl_tc (and all types which can be
converted to it) is defined as an array and can thus never be
NULL.

http://lists.infradead.org/pipermail/libnl/2015-April/001869.html

Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
Signed-off-by: Thomas Haller <thaller@redhat.com>
lib/route/tc.c

index 579405e0a213265708752cc6ef595c39df28d77a..b3f4ac380ef180aab6a4e12891a32562d4ba1051 100644 (file)
@@ -1053,9 +1053,6 @@ void *rtnl_tc_data(struct rtnl_tc *tc)
                size_t size;
 
                if (!tc->tc_ops) {
-                       if (!tc->tc_kind)
-                               BUG();
-
                        if (!rtnl_tc_get_ops(tc))
                                return NULL;
                }