fs: ubifs: Fix and rework error handling in ubifs_finddir
authorAndrew Goodbody <andrew.goodbody@linaro.org>
Fri, 3 Oct 2025 10:42:52 +0000 (11:42 +0100)
committerHeiko Schocher <hs@nabladev.com>
Wed, 8 Oct 2025 09:36:05 +0000 (11:36 +0200)
commit0cab29ff467e297064a9fc30200347bda06ee0c4
tree39106b56ae5b6e1da79d9606602086483aa01763
parent51615eb4f7bcd3367aecdeaea3638058ef5407f3
fs: ubifs: Fix and rework error handling in ubifs_finddir

Add a null check for 'file' before dereferencing it and also rework the
error handling to be a bit more sane.

This issue was found by Smatch.

Signed-off-by: Andrew Goodbody <andrew.goodbody@linaro.org>
fs/ubifs/ubifs.c