[PATCH 5/5] Staging: rtl8723bs: os_dep: Set constant on right side

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Place a constant on the right side of the test.

Signed-off-by: Guilherme Tadashi Maeoka <gui.maeoka@xxxxxxxxx>
---
 drivers/staging/rtl8723bs/os_dep/osdep_service.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/staging/rtl8723bs/os_dep/osdep_service.c b/drivers/staging/rtl8723bs/os_dep/osdep_service.c
index 262b70e88e67..2ad28d903ef8 100644
--- a/drivers/staging/rtl8723bs/os_dep/osdep_service.c
+++ b/drivers/staging/rtl8723bs/os_dep/osdep_service.c
@@ -109,7 +109,7 @@ static int readFile(struct file *fp, char *buf, int len)
 		rlen = fp->f_op->read(fp, (char __force __user *)buf+sum, len-sum, &fp->f_pos);
 		if (rlen > 0)
 			sum += rlen;
-		else if (0 != rlen)
+		else if (rlen != 0)
 			return rlen;
 		else
 			break;
@@ -137,7 +137,7 @@ static int isFileReadable(char *path)
 	} else {
 		oldfs = get_fs(); set_fs(KERNEL_DS);
 
-		if (1 != readFile(fp, &buf, 1))
+		if (readFile(fp, &buf, 1) != 1)
 			ret = -EINVAL;
 
 		set_fs(oldfs);
-- 
2.17.1

_______________________________________________
devel mailing list
devel@xxxxxxxxxxxxxxxxxxxxxx
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel



[Index of Archives]     [Linux Driver Backports]     [DMA Engine]     [Linux GPIO]     [Linux SPI]     [Video for Linux]     [Linux USB Devel]     [Linux Coverity]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]
  Powered by Linux