mirror of
https://github.com/openwrt/openwrt.git
synced 2026-12-06 06:25:41 +04:00
realtek: l3: drop a warning built on a value nobody set
The netevent handler ends by testing an err it never assigns and prints a netdev warning with whatever the stack left there. Nothing it does can fail at that point: the work it has just queued is what could, and that happens somewhere else entirely. No build says so, because the kernel turns -Wmaybe-uninitialized off for GCC outside W=2 (scripts/Makefile.extrawarn). Assisted-by: Claude:claude-opus-5 Signed-off-by: Gennaro Cimmino <gcimmino@rayonra.net> Link: https://github.com/openwrt/openwrt/pull/25311 Signed-off-by: Markus Stockhausen <markus.stockhausen@gmx.de>
This commit is contained in:
1 parent
ab58ca8fc0
commit
f9ee620893
1 file changed
+1
-3
@@ -1652,7 +1652,7 @@ static int otto_l3_netevent_notifier(struct notifier_block *this, unsigned long
|
||||
struct otto_l3_net_event_work *net_work;
|
||||
struct neighbour *n = ptr;
|
||||
struct net_device *dev;
|
||||
int err, port;
|
||||
int port;
|
||||
|
||||
switch (event) {
|
||||
case NETEVENT_NEIGH_UPDATE:
|
||||
@@ -1682,8 +1682,6 @@ static int otto_l3_netevent_notifier(struct notifier_block *this, unsigned long
|
||||
dev_dbg(ctrl->dev, "updating neighbour on port %d, mac %016llx\n",
|
||||
port, net_work->mac);
|
||||
queue_work(priv->wq, &net_work->work);
|
||||
if (err)
|
||||
netdev_warn(dev, "failed to handle neigh update (err %d)\n", err);
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user