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

m68k: dmasound - Kill warn_unused_result warnings

warning: ignoring return value of 'request_irq', declared with attribute
warn_unused_result

Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>

+13 -8
+3 -2
sound/oss/dmasound/dmasound_atari.c
··· 851 851 mfp.tim_dt_a = 1; /* Cause interrupt after first event. */ 852 852 mfp.tim_ct_a = 8; /* Turn on event counting. */ 853 853 /* Register interrupt handler. */ 854 - request_irq(IRQ_MFP_TIMA, AtaInterrupt, IRQ_TYPE_SLOW, "DMA sound", 855 - AtaInterrupt); 854 + if (request_irq(IRQ_MFP_TIMA, AtaInterrupt, IRQ_TYPE_SLOW, "DMA sound", 855 + AtaInterrupt)) 856 + return 0; 856 857 mfp.int_en_a |= 0x20; /* Turn interrupt on. */ 857 858 mfp.int_mk_a |= 0x20; 858 859 return 1;
+10 -6
sound/oss/dmasound/dmasound_q40.c
··· 371 371 static int __init Q40IrqInit(void) 372 372 { 373 373 /* Register interrupt handler. */ 374 - request_irq(Q40_IRQ_SAMPLE, Q40StereoInterrupt, 0, 375 - "DMA sound", Q40Interrupt); 374 + if (request_irq(Q40_IRQ_SAMPLE, Q40StereoInterrupt, 0, 375 + "DMA sound", Q40Interrupt)) 376 + return 0; 376 377 377 378 return(1); 378 379 } ··· 402 401 u_char *start; 403 402 u_long size; 404 403 u_char speed; 404 + int error; 405 405 406 406 /* used by Q40Play() if all doubts whether there really is something 407 407 * to be played are already wiped out. ··· 421 419 master_outb( 0,SAMPLE_ENABLE_REG); 422 420 free_irq(Q40_IRQ_SAMPLE, Q40Interrupt); 423 421 if (dmasound.soft.stereo) 424 - request_irq(Q40_IRQ_SAMPLE, Q40StereoInterrupt, 0, 425 - "Q40 sound", Q40Interrupt); 422 + error = request_irq(Q40_IRQ_SAMPLE, Q40StereoInterrupt, 0, 423 + "Q40 sound", Q40Interrupt); 426 424 else 427 - request_irq(Q40_IRQ_SAMPLE, Q40MonoInterrupt, 0, 428 - "Q40 sound", Q40Interrupt); 425 + error = request_irq(Q40_IRQ_SAMPLE, Q40MonoInterrupt, 0, 426 + "Q40 sound", Q40Interrupt); 427 + if (error && printk_ratelimit()) 428 + pr_err("Couldn't register sound interrupt\n"); 429 429 430 430 master_outb( speed, SAMPLE_RATE_REG); 431 431 master_outb( 1,SAMPLE_CLEAR_REG);