Arnd Bergmann 67893f12e5 gfs2: avoid uninitialized variable warning
We get a bogus warning about a potential uninitialized variable
use in gfs2, because the compiler does not figure out that we
never use the leaf number if get_leaf_nr() returns an error:

fs/gfs2/dir.c: In function 'get_first_leaf':
fs/gfs2/dir.c:802:9: warning: 'leaf_no' may be used uninitialized in this function [-Wmaybe-uninitialized]
fs/gfs2/dir.c: In function 'dir_split_leaf':
fs/gfs2/dir.c:1021:8: warning: 'leaf_no' may be used uninitialized in this function [-Wmaybe-uninitialized]

Changing the 'if (!error)' to 'if (!IS_ERR_VALUE(error))' is
sufficient to let gcc understand that this is exactly the same
condition as in IS_ERR() so it can optimize the code path enough
to understand it.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Bob Peterson <rpeterso@redhat.com>
2016-03-15 10:46:11 -04:00
..
2014-03-03 13:50:12 +00:00
2015-12-22 08:06:08 -06:00
2008-06-27 09:39:44 +01:00
2015-12-14 12:19:24 -06:00
2015-10-29 12:57:48 -05:00
2015-12-14 12:19:37 -06:00
2016-01-12 18:09:35 -08:00
2013-06-14 11:17:15 +01:00
2013-06-03 14:20:18 -07:00
2015-11-09 15:11:24 -08:00
2014-05-14 10:04:34 +01:00
2015-09-11 12:23:51 -07:00
2011-05-10 13:12:49 +01:00
2015-11-16 12:00:29 -06:00
2016-01-12 18:09:35 -08:00
2015-12-14 12:19:24 -06:00
2015-01-13 10:48:57 +00:00
2015-05-05 13:23:22 -05:00
2012-01-11 09:23:05 +00:00
2016-01-12 18:09:35 -08:00
2015-12-06 21:25:17 -05:00