]> git.ipfire.org Git - thirdparty/u-boot.git/commit
fs: ext4fs: Perform NULL check before dereference
authorAndrew Goodbody <andrew.goodbody@linaro.org>
Fri, 4 Jul 2025 12:32:44 +0000 (13:32 +0100)
committerTom Rini <trini@konsulko.com>
Fri, 11 Jul 2025 16:44:29 +0000 (10:44 -0600)
commit2d6221262ee948b9ae407b51a9bae693348826f5
treec2d1e38ada3168da77eb442b749bc7aad9321c02
parent36f05e622446046a93ff3a2c6958b65b85c6bffd
fs: ext4fs: Perform NULL check before dereference

In the function put_ext4 there is a NULL check for fs->dev_desc but this
has already been derefenced twice before this happens. Refactor the code
a bit to put the NULL check first.

This issue found by Smatch.

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