From: YueHaibing <yuehaibing@xxxxxxxxxx> Date: Tue, 4 Sep 2018 02:56:26 +0000 > Fixes gcc '-Wunused-but-set-variable' warning: > > drivers/net/net_failover.c: In function 'net_failover_slave_unregister': > drivers/net/net_failover.c:598:35: warning: > variable 'primary_dev' set but not used [-Wunused-but-set-variable] > > There should check the validity of 'slave_dev'. > > Fixes: cfc80d9a1163 ("net: Introduce net_failover driver") > > Signed-off-by: YueHaibing <yuehaibing@xxxxxxxxxx> > --- > v2: use WARN_ON_ONCE as Liran Alon suggested Applied.