mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2026-01-10 12:46:32 +01:00
netdevsim: remove redundant branch
bool notify is referenced nowhere else in the function except to check whether or not to call rtnl_offload_xstats_notify(). Remove it and move the call to the previous branch. Signed-off-by: Dennis Chen <dechen@redhat.com> Reviewed-by: Simon Horman <horms@kernel.org> Reviewed-by: Petr Machata <petrm@nvidia.com> Link: https://patch.msgid.link/20250716165750.561175-1-dechen@redhat.com Signed-off-by: Jakub Kicinski <kuba@kernel.org>
This commit is contained in:
committed by
Jakub Kicinski
parent
ffe5aedc43
commit
a93f38ebff
@@ -220,7 +220,6 @@ nsim_dev_hwstats_enable_ifindex(struct nsim_dev_hwstats *hwstats,
|
||||
struct nsim_dev_hwstats_netdev *hwsdev;
|
||||
struct nsim_dev *nsim_dev;
|
||||
struct net_device *netdev;
|
||||
bool notify = false;
|
||||
struct net *net;
|
||||
int err = 0;
|
||||
|
||||
@@ -251,11 +250,9 @@ nsim_dev_hwstats_enable_ifindex(struct nsim_dev_hwstats *hwstats,
|
||||
|
||||
if (netdev_offload_xstats_enabled(netdev, type)) {
|
||||
nsim_dev_hwsdev_enable(hwsdev, NULL);
|
||||
notify = true;
|
||||
rtnl_offload_xstats_notify(netdev);
|
||||
}
|
||||
|
||||
if (notify)
|
||||
rtnl_offload_xstats_notify(netdev);
|
||||
rtnl_unlock();
|
||||
return err;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user