Commit 6d8c96cb authored by David Binder's avatar David Binder Committed by Greg Kroah-Hartman

staging: unisys: visornic: simplify visornic if statements

Changes the conditional logic by looking for the absence of work
to do, instead of the opposite.
Signed-off-by: default avatarDavid Binder <david.binder@unisys.com>
Reviewed-by: default avatarTim Sell <Timothy.Sell@unisys.com>
Signed-off-by: default avatarDavid Kershner <david.kershner@unisys.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent d91184a9
...@@ -1000,25 +1000,28 @@ visornic_set_multi(struct net_device *netdev) ...@@ -1000,25 +1000,28 @@ visornic_set_multi(struct net_device *netdev)
struct uiscmdrsp *cmdrsp; struct uiscmdrsp *cmdrsp;
struct visornic_devdata *devdata = netdev_priv(netdev); struct visornic_devdata *devdata = netdev_priv(netdev);
/* any filtering changes */ if (devdata->old_flags == netdev->flags)
if (devdata->old_flags != netdev->flags) { return;
if ((netdev->flags & IFF_PROMISC) !=
(devdata->old_flags & IFF_PROMISC)) { if ((netdev->flags & IFF_PROMISC) ==
cmdrsp = kmalloc(SIZEOF_CMDRSP, GFP_ATOMIC); (devdata->old_flags & IFF_PROMISC))
if (!cmdrsp) goto out_save_flags;
return;
cmdrsp->cmdtype = CMD_NET_TYPE; cmdrsp = kmalloc(SIZEOF_CMDRSP, GFP_ATOMIC);
cmdrsp->net.type = NET_RCV_PROMISC; if (!cmdrsp)
cmdrsp->net.enbdis.context = netdev; return;
cmdrsp->net.enbdis.enable = cmdrsp->cmdtype = CMD_NET_TYPE;
netdev->flags & IFF_PROMISC; cmdrsp->net.type = NET_RCV_PROMISC;
visorchannel_signalinsert(devdata->dev->visorchannel, cmdrsp->net.enbdis.context = netdev;
IOCHAN_TO_IOPART, cmdrsp->net.enbdis.enable =
cmdrsp); netdev->flags & IFF_PROMISC;
kfree(cmdrsp); visorchannel_signalinsert(devdata->dev->visorchannel,
} IOCHAN_TO_IOPART,
devdata->old_flags = netdev->flags; cmdrsp);
} kfree(cmdrsp);
out_save_flags:
devdata->old_flags = netdev->flags;
} }
/** /**
......
Markdown is supported
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