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

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
Loading
Loading
Loading
Loading
+22 −19
Original line number Diff line number Diff line
@@ -1000,10 +1000,13 @@ visornic_set_multi(struct net_device *netdev)
	struct uiscmdrsp *cmdrsp;
	struct visornic_devdata *devdata = netdev_priv(netdev);

	/* any filtering changes */
	if (devdata->old_flags != netdev->flags) {
		if ((netdev->flags & IFF_PROMISC) !=
		    (devdata->old_flags & IFF_PROMISC)) {
	if (devdata->old_flags == netdev->flags)
		return;

	if ((netdev->flags & IFF_PROMISC) ==
	    (devdata->old_flags & IFF_PROMISC))
		goto out_save_flags;

	cmdrsp = kmalloc(SIZEOF_CMDRSP, GFP_ATOMIC);
	if (!cmdrsp)
		return;
@@ -1016,10 +1019,10 @@ visornic_set_multi(struct net_device *netdev)
				  IOCHAN_TO_IOPART,
				  cmdrsp);
	kfree(cmdrsp);
		}

out_save_flags:
	devdata->old_flags = netdev->flags;
}
}

/**
 *	visornic_xmit_timeout - request to timeout the xmit