summaryrefslogtreecommitdiffstats
path: root/drivers/ddr/imx/imx8m/ddr_init.c
diff options
context:
space:
mode:
authorQu Wenruo <wqu@suse.com>2020-10-31 09:07:49 +0800
committerTom Rini <trini@konsulko.com>2020-11-19 09:45:49 -0500
commit9b5546c37ab020039f06855eae28fbd56adb096b (patch)
tree87e581f0e6e832f8b308ccfdd8893237409a5586 /drivers/ddr/imx/imx8m/ddr_init.c
parentc49b0eb034710f08fc68cbfa2c23811e10667ad9 (diff)
downloadu-boot-9b5546c37ab020039f06855eae28fbd56adb096b.tar.gz
u-boot-9b5546c37ab020039f06855eae28fbd56adb096b.tar.xz
u-boot-9b5546c37ab020039f06855eae28fbd56adb096b.zip
fs: btrfs: inode: handle uninitialized type before returning it
In btrfs_lookup_path() the local variable @type should always be updated after we hit any file/dir. But if @filename is NULL from the very beginning, then we don't initialize it and return it directly. To prevent such problem from happening, we initialize @type to BTRFS_FT_UNKNOWN. For normal execution route, it will get updated for each filename we resolved. Buf if we didn't find any path, we check if the type is still FT_UNKNOWN and ret == 0. If true we know there is something wrong, just return -EUCLEAN to inform the caller. Reported-by: Coverity CID 312958 Signed-off-by: Qu Wenruo <wqu@suse.com> Reviewed-by: Marek BehĂșn <marek.behun@nic.cz>
Diffstat (limited to 'drivers/ddr/imx/imx8m/ddr_init.c')
0 files changed, 0 insertions, 0 deletions