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

Input: ct82710c - return proper error code for ct82c710_open

If request_irq() fails we should return the proper error instead of -1.

Signed-off-by: Davidlohr Bueso <dave@gnu.org>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>

authored by

Davidlohr Bueso and committed by
Dmitry Torokhov
b0f05aad 81e78dea

+5 -3
+5 -3
drivers/input/serio/ct82c710.c
··· 111 111 static int ct82c710_open(struct serio *serio) 112 112 { 113 113 unsigned char status; 114 + int err; 114 115 115 - if (request_irq(CT82C710_IRQ, ct82c710_interrupt, 0, "ct82c710", NULL)) 116 - return -1; 116 + err = request_irq(CT82C710_IRQ, ct82c710_interrupt, 0, "ct82c710", NULL); 117 + if (err) 118 + return err; 117 119 118 120 status = inb_p(CT82C710_STATUS); 119 121 ··· 133 131 status &= ~(CT82C710_ENABLE | CT82C710_INTS_ON); 134 132 outb_p(status, CT82C710_STATUS); 135 133 free_irq(CT82C710_IRQ, NULL); 136 - return -1; 134 + return -EBUSY; 137 135 } 138 136 139 137 return 0;