Skip to content

Commit

Permalink
IRQ: add __must_check to request_irq
Browse files Browse the repository at this point in the history
This could help to find buggy drivers where request_irq return value wasn't
checked.  There's just no reason to ignore errors which can and do occur.
Anyone who got warning during compilation have to realise what it is't
realy safe code.

Signed-off-by: Monakhov Dmitriy <dmonakhov@openvz.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
  • Loading branch information
Monakhov Dmitriy authored and Linus Torvalds committed May 8, 2007
1 parent c761c84 commit 616883d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions include/linux/interrupt.h
Original file line number Diff line number Diff line change
Expand Up @@ -83,11 +83,11 @@ struct irqaction {
};

extern irqreturn_t no_action(int cpl, void *dev_id);
extern int request_irq(unsigned int, irq_handler_t handler,
extern int __must_check request_irq(unsigned int, irq_handler_t handler,
unsigned long, const char *, void *);
extern void free_irq(unsigned int, void *);

extern int devm_request_irq(struct device *dev, unsigned int irq,
extern int __must_check devm_request_irq(struct device *dev, unsigned int irq,
irq_handler_t handler, unsigned long irqflags,
const char *devname, void *dev_id);
extern void devm_free_irq(struct device *dev, unsigned int irq, void *dev_id);
Expand Down

0 comments on commit 616883d

Please sign in to comment.