Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

[MIPS] IP22: Complain if requesting the front panel irq failed.

This fixes the warning:

CC arch/mips/sgi-ip22/ip22-reset.o
arch/mips/sgi-ip22/ip22-reset.c: In function 'reboot_setup':
arch/mips/sgi-ip22/ip22-reset.c:239: warning: ignoring return value of 'request_irq', declared with attribute warn_unused_result

Signed-off-by: Ralf Baechle <ralf@linux-mips.org>

+8 -1
+8 -1
arch/mips/sgi-ip22/ip22-reset.c
··· 232 232 233 233 static int __init reboot_setup(void) 234 234 { 235 + int res; 236 + 235 237 _machine_restart = sgi_machine_restart; 236 238 _machine_halt = sgi_machine_halt; 237 239 pm_power_off = sgi_machine_power_off; 238 240 239 - request_irq(SGI_PANEL_IRQ, panel_int, 0, "Front Panel", NULL); 241 + res = request_irq(SGI_PANEL_IRQ, panel_int, 0, "Front Panel", NULL); 242 + if (res) { 243 + printk(KERN_ERR "Allocation of front panel IRQ failed\n"); 244 + return res; 245 + } 246 + 240 247 init_timer(&blink_timer); 241 248 blink_timer.function = blink_timeout; 242 249 atomic_notifier_chain_register(&panic_notifier_list, &panic_block);