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

From: Guilherme Tadashi Maeoka
Date: Sat Mar 09 2019 - 13:31:27 EST


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