From: Wahib Faizi Date: Thu, 12 Jun 2014 19:40:18 +0000 (+0400) Subject: staging: usbip: usbip_host_driver.c: avoid assignment in if X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=da87dba81716adccec405470a76c8cc8b930aad8;p=openwrt%2Fstaging%2Fblogic.git staging: usbip: usbip_host_driver.c: avoid assignment in if 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 Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/staging/usbip/userspace/libsrc/usbip_host_driver.c b/drivers/staging/usbip/userspace/libsrc/usbip_host_driver.c index 92caef7474c7..32b8f52ace21 100644 --- a/drivers/staging/usbip/userspace/libsrc/usbip_host_driver.c +++ b/drivers/staging/usbip/userspace/libsrc/usbip_host_driver.c @@ -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; }