summaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/nouveau/nouveau_fence.c
diff options
context:
space:
mode:
authorArnd Bergmann <arnd@arndb.de>2016-10-24 18:30:38 +0300
committerBen Skeggs <bskeggs@redhat.com>2016-11-07 07:04:36 +0300
commitb74c0a9969f25217a5e5bbcac56a11bee16718d3 (patch)
tree1c0f242feee474828480f8c93e6a41cde22d41e7 /drivers/gpu/drm/nouveau/nouveau_fence.c
parente08a1d97d33e2ac05cd368b955f9fdc2823f15fd (diff)
downloadlinux-b74c0a9969f25217a5e5bbcac56a11bee16718d3.tar.xz
drm/nouveau: hide gcc-4.9 -Wmaybe-uninitialized
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>
Diffstat (limited to 'drivers/gpu/drm/nouveau/nouveau_fence.c')
0 files changed, 0 insertions, 0 deletions