Commit 727bb648 authored by David Kershner's avatar David Kershner Committed by Greg Kroah-Hartman
Browse files

staging: unisys: don't copy to local variable



Do the check with the values in the structure instead of copying them to
local variables.

Reviewed-by: default avatarSameer Wadgaonkar <sameer.wadgaonkar@unisys.com>
Signed-off-by: default avatarDavid Kershner <david.kershner@unisys.com>
Reviewed-by: default avatarTim Sell <timothy.sell@unisys.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent f51963f5
Loading
Loading
Loading
Loading
+2 −4
Original line number Diff line number Diff line
@@ -373,11 +373,9 @@ static int match_visorbus_dev_by_id(struct device *dev, void *data)
{
	struct visor_device *vdev = to_visor_device(dev);
	struct visor_busdev *id = data;
	u32 bus_no = id->bus_no;
	u32 dev_no = id->dev_no;

	if ((vdev->chipset_bus_no == bus_no) &&
	    (vdev->chipset_dev_no == dev_no))
	if ((vdev->chipset_bus_no == id->bus_no) &&
	    (vdev->chipset_dev_no == id->dev_no))
		return 1;

	return 0;