staging: rtl8723bs: os_dep: Fix assignment in if condition
authorGuilherme Tadashi Maeoka <gui.maeoka@gmail.com>
Sat, 9 Mar 2019 18:30:43 +0000 (15:30 -0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 18 Mar 2019 06:06:19 +0000 (07:06 +0100)
Fix an assignment in if condition.

Signed-off-by: Guilherme Tadashi Maeoka <gui.maeoka@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/rtl8723bs/os_dep/osdep_service.c

index 4378827243f05c5146c31f31a9b2dc388134d782..1e289c45d26acd12878d58b5de2391bead86e6e6 100644 (file)
@@ -155,7 +155,9 @@ static int retriveFromFile(char *path, u8 *buf, u32 sz)
        struct file *fp;
 
        if (path && buf) {
-               if (0 == (ret =openFile(&fp, path, O_RDONLY, 0))) {
+               ret = openFile(&fp, path, O_RDONLY, 0);
+
+               if (ret == 0) {
                        DBG_871X("%s openFile path:%s fp =%p\n", __func__, path , fp);
 
                        ret =readFile(fp, buf, sz);