staging: usbip: usbip_host_driver.c: avoid assignment in if
authorWahib Faizi <wahibfaizi@gmail.com>
Thu, 12 Jun 2014 19:40:18 +0000 (23:40 +0400)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 17 Jun 2014 22:42:39 +0000 (15:42 -0700)
Fix coding style issue "do not use assignment in if condition"
detected by checkpatch.pl in usbip_host_driver.c.

Signed-off-by: Wahib Faizi <wahibfaizi@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/usbip/userspace/libsrc/usbip_host_driver.c

index 92caef7474c7d7286486ae880876ab405fccf42f..32b8f52ace214b90b02faba1e5a23d80fa783615 100644 (file)
@@ -47,7 +47,8 @@ static int32_t read_attr_usbip_status(struct usbip_usb_device *udev)
        snprintf(status_attr_path, SYSFS_PATH_MAX, "%s/usbip_status",
                 udev->path);
 
-       if ((fd = open(status_attr_path, O_RDONLY)) < 0) {
+       fd = open(status_attr_path, O_RDONLY);
+       if (fd < 0) {
                err("error opening attribute %s", status_attr_path);
                return -1;
        }