staging: unisys: don't copy to local variable
authorDavid Kershner <david.kershner@unisys.com>
Tue, 22 Aug 2017 17:27:22 +0000 (13:27 -0400)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 22 Aug 2017 22:12:52 +0000 (15:12 -0700)
Do the check with the values in the structure instead of copying them to
local variables.

Reviewed-by: Sameer Wadgaonkar <sameer.wadgaonkar@unisys.com>
Signed-off-by: David Kershner <david.kershner@unisys.com>
Reviewed-by: Tim Sell <timothy.sell@unisys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/unisys/visorbus/visorchipset.c

index 29475ccf81c18e075b06f299e65c603f28041109..98ce796e85c14cb8197ad604fa1796ee430c1597 100644 (file)
@@ -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;