linux/fs/udf
Arnd Bergmann 4f1b1519f7 udf: avoid uninitialized variable use
A new warning has come up from a recent cleanup:

fs/udf/inode.c: In function 'udf_setup_indirect_aext':
fs/udf/inode.c:1927:28: warning: 'adsize' may be used uninitialized in this function [-Wmaybe-uninitialized]

If the alloc_type is neither ICBTAG_FLAG_AD_SHORT nor
ICBTAG_FLAG_AD_LONG, the value of adsize is undefined. Currently,
callers of these functions make sure alloc_type is one of the two valid
ones but for future proofing make sure we handle the case of invalid
alloc type as well.  This changes the code to return -EIOin that case.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Fixes: fcea62babc ("udf: Factor out code for creating indirect extent")
Signed-off-by: Jan Kara <jack@suse.cz>
2016-01-04 10:53:29 +01:00
..
balloc.c udf: Factor out code for creating indirect extent 2015-12-23 18:04:52 +01:00
dir.c udf: Make udf_get_filename() return error instead of 0 length file name 2015-05-18 11:23:06 +02:00
directory.c udf: remove redundant buffer_head.h includes 2015-03-14 07:54:02 +01:00
ecma_167.h Remove struct typedefs from fs/udf/ecma_167.h et al. 2009-04-02 12:29:47 +02:00
file.c udf: remove double err declaration in udf_file_write_iter() 2015-05-18 11:23:09 +02:00
ialloc.c udf: saner calling conventions for udf_new_inode() 2014-09-04 21:37:41 +02:00
inode.c udf: avoid uninitialized variable use 2016-01-04 10:53:29 +01:00
Kconfig udf: Update Kconfig description 2015-01-05 11:04:37 +01:00
lowlevel.c udf: use linux/uaccess.h 2014-07-15 22:40:23 +02:00
Makefile switch udf to simple_fsync() 2009-06-11 21:36:13 -04:00
misc.c udf: remove redundant buffer_head.h includes 2015-03-14 07:54:02 +01:00
namei.c UDF: support NFSv2 export 2015-05-18 11:23:08 +02:00
osta_udf.h Remove struct typedefs from fs/udf/ecma_167.h et al. 2009-04-02 12:29:47 +02:00
partition.c udf: remove redundant buffer_head.h includes 2015-03-14 07:54:02 +01:00
super.c udf: limit the maximum number of TD redirections 2015-12-14 20:13:36 +01:00
symlink.c udf: Return -ENOMEM when allocation fails in udf_get_filename() 2015-05-18 11:23:03 +02:00
truncate.c udf: remove redundant buffer_head.h includes 2015-03-14 07:54:02 +01:00
udf_i.h fs: cleanup slight list_entry abuse 2015-06-23 18:01:59 -04:00
udf_sb.h udf: Fortify LVID loading 2013-09-24 11:23:33 +02:00
udfdecl.h udf: Factor out code for creating indirect extent 2015-12-23 18:04:52 +01:00
udfend.h Remove struct typedefs from fs/udf/ecma_167.h et al. 2009-04-02 12:29:47 +02:00
udftime.c udf: remove redundant sys_tz declaration 2014-09-29 13:45:12 +02:00
unicode.c udf: Make udf_get_filename() return error instead of 0 length file name 2015-05-18 11:23:06 +02:00