Arnd Bergmann
c19bb06726
drm/nouveau: hide gcc-4.9 -Wmaybe-uninitialized
...
commit b74c0a9969 upstream.
gcc-4.9 notices that the validate_init() function returns unintialized
data when called with a zero 'nr_buffers' argument, when called with the
-Wmaybe-uninitialized flag:
drivers/gpu/drm/nouveau/nouveau_gem.c: In function ‘validate_init.isra.6’:
drivers/gpu/drm/nouveau/nouveau_gem.c:457:5: error: ‘ret’ may be used uninitialized in this function [-Werror=maybe-uninitialized]
However, the only caller of this function always passes a nonzero
argument, and gcc-6 is clever enough to take this into account and
not warn about it any more.
Adding an explicit initialization to -EINVAL here is correct even if
the caller changed, and it avoids the warning on gcc-4.9 as well.
Signed-off-by: Arnd Bergmann <arnd@arndb.de >
Reviewed-By: Karol Herbst <karolherbst@gmail.com >
Signed-off-by: Ben Skeggs <bskeggs@redhat.com >
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2018-02-25 11:03:48 +01:00
..
2018-02-16 20:09:47 +01:00
2018-02-25 11:03:38 +01:00
2018-02-16 20:09:42 +01:00
2017-12-16 10:33:55 +01:00
2018-01-31 12:06:08 +01:00
2017-03-12 06:37:30 +01:00
2018-02-16 20:09:47 +01:00
2018-02-16 20:09:46 +01:00
2018-01-10 09:27:09 +01:00
2018-02-25 11:03:47 +01:00
2017-12-20 10:04:59 +01:00
2017-10-27 10:23:17 +02:00
2016-01-04 21:46:45 -05:00
2018-02-03 17:04:27 +01:00
2017-12-25 14:22:15 +01:00
2018-02-16 20:09:45 +01:00
2018-02-22 15:44:58 +01:00
2018-02-25 11:03:41 +01:00
2015-10-30 01:16:16 -04:00
2018-02-16 20:09:47 +01:00
2017-11-21 09:21:18 +01:00
2016-11-10 16:36:35 +01:00
2017-12-20 10:04:56 +01:00
2015-11-24 15:25:46 -08:00
2018-02-25 11:03:42 +01:00
2018-02-25 11:03:48 +01:00
2018-02-16 20:09:46 +01:00
2015-10-30 16:10:40 +01:00
2018-02-25 11:03:46 +01:00
2018-02-03 17:04:28 +01:00
2016-02-25 12:01:23 -08:00
2017-12-20 10:04:54 +01:00
2018-02-25 11:03:48 +01:00
2015-11-06 17:50:42 -08:00
2016-09-15 08:27:46 +02:00
2018-02-25 11:03:48 +01:00
2018-02-25 11:03:48 +01:00
2018-01-31 12:06:11 +01:00
2018-01-17 09:35:25 +01:00
2017-12-16 10:33:52 +01:00
2018-02-25 11:03:42 +01:00
2017-05-14 13:32:55 +02:00
2016-09-24 10:07:35 +02:00
2015-10-15 20:31:59 +11:00
2017-08-06 19:19:41 -07:00
2016-06-01 12:15:53 -07:00
2018-02-25 11:03:44 +01:00
2018-02-25 11:03:48 +01:00
2017-12-16 10:33:51 +01:00
2016-10-28 03:01:35 -04:00
2018-02-25 11:03:45 +01:00
2018-01-02 20:33:20 +01:00
2017-12-25 14:22:08 +01:00
2018-01-31 12:06:09 +01:00
2018-02-25 11:03:46 +01:00
2018-02-25 11:03:47 +01:00
2017-08-06 19:19:40 -07:00
2017-08-30 10:19:29 +02:00
2017-11-30 08:37:23 +00:00
2018-02-16 20:09:47 +01:00
2017-08-06 19:19:46 -07:00
2017-07-27 15:06:09 -07:00
2018-01-02 20:33:20 +01:00
2017-06-17 06:39:37 +02:00
2018-01-31 12:06:08 +01:00
2016-04-20 15:42:09 +09:00
2016-10-07 15:23:41 +02:00
2018-01-23 19:50:16 +01:00
2018-02-25 11:03:39 +01:00
2018-02-25 11:03:47 +01:00
2016-08-16 09:30:48 +02:00
2018-02-03 17:04:25 +01:00
2015-12-12 02:31:11 +01:00
2016-08-10 11:49:25 +02:00
2017-03-15 09:57:14 +08:00
2017-11-02 09:40:50 +01:00
2016-08-20 18:09:20 +02:00
2018-02-22 15:44:59 +01:00
2018-02-25 11:03:40 +01:00
2018-02-25 11:03:45 +01:00
2016-03-09 15:34:49 -08:00
2016-09-24 10:07:42 +02:00
2018-02-25 11:03:41 +01:00
2017-07-27 15:06:10 -07:00
2018-02-25 11:03:44 +01:00
2018-02-25 11:03:48 +01:00
2018-02-25 11:03:46 +01:00
2018-02-25 11:03:44 +01:00
2016-06-01 12:15:53 -07:00
2018-02-25 11:03:48 +01:00
2016-10-31 04:13:59 -06:00
2018-02-25 11:03:45 +01:00
2017-10-12 11:27:35 +02:00
2017-08-06 19:19:46 -07:00
2018-02-16 20:09:38 +01:00
2018-02-25 11:03:47 +01:00
2018-02-25 11:03:42 +01:00
2017-01-19 20:17:21 +01:00
2017-03-12 06:37:29 +01:00
2018-02-16 20:09:45 +01:00
2018-02-25 11:03:41 +01:00
2015-11-04 22:15:15 -08:00
2018-02-25 11:03:38 +01:00