]> www.infradead.org Git - users/jedix/linux-maple.git/commit
gpu: host1x: fix uninitialized variable use
authorArnd Bergmann <arnd@arndb.de>
Fri, 27 Jan 2023 22:14:00 +0000 (23:14 +0100)
committerLiam R. Howlett <Liam.Howlett@oracle.com>
Fri, 24 Mar 2023 14:25:31 +0000 (10:25 -0400)
commit5cc3b72a33d5c23e2c9d2e0595d8fd5b18893a82
tree5135ef21e144fd5567903bfd2777ca3176d7c10e
parentc6db2e53fd4671c2d5a6acc64202823f07c7b030
gpu: host1x: fix uninitialized variable use

The error handling for platform_get_irq() failing no longer works after
a recent change, clang now points this out with a warning:

  drivers/gpu/host1x/dev.c:520:6: error: variable 'syncpt_irq' is uninitialized when used here [-Werror,-Wuninitialized]
          if (syncpt_irq < 0)
              ^~~~~~~~~~

Fix this by removing the variable and checking the correct error status.

Fixes: 625d4ffb438c ("gpu: host1x: Rewrite syncpoint interrupt handling")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Reviewed-by: Jon Hunter <jonathanh@nvidia.com>
Reviewed-by: Nick Desaulniers <ndesaulniers@google.com>
Reviewed-by: Mikko Perttunen <mperttunen@nvidia.com>
Reviewed-by: Nathan Chancellor <nathan@kernel.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
drivers/gpu/host1x/dev.c