Skip to content
Commit 9e7e6cab authored by YueHaibing's avatar YueHaibing Committed by David S. Miller
Browse files

failover: Add missing check to validate 'slave_dev' in net_failover_slave_unregister



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: cfc80d9a ("net: Introduce net_failover driver")

Signed-off-by: default avatarYueHaibing <yuehaibing@huawei.com>
Acked-by: default avatarSridhar Samudrala <sridhar.samudrala@intel.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 428f944b
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment