system-linux: remove superfluous dev check
authorHans Dedecker <dedeckeh@gmail.com>
Thu, 13 Jun 2019 19:48:00 +0000 (21:48 +0200)
committerHans Dedecker <dedeckeh@gmail.com>
Thu, 13 Jun 2019 19:58:02 +0000 (21:58 +0200)
No need to check if dev is NULL as device is always set when
system_neigh is called

Fixes issue reported by Coverity in CID 1445818

Signed-off-by: Hans Dedecker <dedeckeh@gmail.com>
system-linux.c

index c63d8d83bbcf93d865499b297f6df4a75dfcb433..6e5ca2861cd4b09804ba3ac2f5bd9c5f1e0e6e31 100644 (file)
@@ -1945,9 +1945,6 @@ static int system_neigh(struct device *dev, struct device_neighbor *neighbor, in
        };
        struct nl_msg *msg;
 
-       if (!dev)
-               return 1;
-
        if (cmd == RTM_NEWNEIGH)
                flags |= NLM_F_CREATE | NLM_F_REPLACE;