genirq: Use scoped_guard() to shut clang up
authorThomas Gleixner <tglx@linutronix.de>
Wed, 7 May 2025 13:47:06 +0000 (15:47 +0200)
committerThomas Gleixner <tglx@linutronix.de>
Wed, 7 May 2025 15:08:44 +0000 (17:08 +0200)
commit97f4b999e0c894d3e48e318aa1130132031815b3
tree7d9e2fee3ee406bce396efee11eaa35515486f94
parentaefc11550ebd08eadee6d643792c9092de2e472f
genirq: Use scoped_guard() to shut clang up

This code pattern trips clang up:

     if (fail)
      goto undo;

     guard(lock)(lock);
     do_stuff();
     return 0;

undo:
     ...

as it somehow extends the scope of the guard beyond the return statement.

Replace it with a scoped guard to help it to get its act together.

Reported-by: kernel test robot <lkp@intel.com>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Closes: https://lore.kernel.org/oe-kbuild-all/202505071809.ajpPxfoZ-lkp@intel.com/
kernel/irq/manage.c