staging: unisys: remove unnecessary complication from delete_vbus_device
authorBenjamin Romer <benjamin.romer@unisys.com>
Mon, 16 Mar 2015 17:57:48 +0000 (13:57 -0400)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 20 Mar 2015 13:19:16 +0000 (14:19 +0100)
Take out the variable used to compute a comparison against NULL, and
just use the parameter directly.

Signed-off-by: Benjamin Romer <benjamin.romer@unisys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/unisys/virtpci/virtpci.c

index 3f399e60ae8deb93e981e8894bc7159ff22e9120..b169d392fce93c90559267a495193cfef06b364b 100644 (file)
@@ -400,10 +400,9 @@ delete_vbus(struct del_vbus_guestpart *delparams)
 static int
 delete_vbus_device(struct device *vbus, void *data)
 {
-       int checkforroot = (data != NULL);
        struct device *dev = &virtpci_rootbus_device;
 
-       if ((checkforroot) && match_busid(vbus, (void *)BUS_ID(dev))) {
+       if ((data) && match_busid(vbus, (void *)BUS_ID(dev))) {
                /* skip it - don't delete root bus */
                return 0;       /* pretend no error */
        }