fs/squashfs: sqfs_get_abs_path: fix error check
authorRichard Genoud <richard.genoud@posteo.net>
Tue, 3 Nov 2020 11:11:16 +0000 (12:11 +0100)
committerMarek Szyprowski <m.szyprowski@samsung.com>
Mon, 15 Nov 2021 10:37:12 +0000 (11:37 +0100)
the return value of sqfs_tokenize(rel_tokens, rc, rel); wasn't checked.
(but "ret" value was !)
This is obviouly a typo.

Reviewed-by: Joao Marcos Costa <jmcosta944@gmail.com>
Signed-off-by: Richard Genoud <richard.genoud@posteo.net>
[jh80.chung: cherry picked from mainline commit 53db0e24a8f981c1e303a1c745b8f0e28544096f]
Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>
Change-Id: Ib9ff7ebded9de101a0d929414c8ecdf6137e8621

fs/squashfs/sqfs.c

index c9e831761367259e87f3c0aec8462c223a6335be..631d41d7ef7abb591506dd58256397ba5d0464c2 100644 (file)
@@ -359,7 +359,7 @@ static char *sqfs_get_abs_path(const char *base, const char *rel)
        if (ret)
                goto free_r_tokens;
 
-       sqfs_tokenize(rel_tokens, rc, rel);
+       ret = sqfs_tokenize(rel_tokens, rc, rel);
        if (ret)
                goto free_r_tokens;