Don't ignore return value of comedi_request_irq().
authorIan Abbott <abbotti@mev.co.uk>
Wed, 27 Jun 2007 10:37:20 +0000 (10:37 +0000)
committerIan Abbott <abbotti@mev.co.uk>
Wed, 27 Jun 2007 10:37:20 +0000 (10:37 +0000)
comedi/drivers/dt2814.c

index 80b8dc19b89e6c0da508afa096b6feba09692619..64628975288374ddfc29963d9adf248028411b51 100644 (file)
@@ -280,9 +280,12 @@ static int dt2814_attach(comedi_device *dev,comedi_devconfig *it)
 #endif
        dev->irq=0;
        if(irq>0){
-               printk("( irq = %d )\n",irq);
-               comedi_request_irq(irq,dt2814_interrupt,0,"dt2814",dev);
-               dev->irq=irq;
+               if(comedi_request_irq(irq,dt2814_interrupt,0,"dt2814",dev)){
+                       printk("(irq %d unavailable)\n", irq);
+               }else{
+                       printk("( irq = %d )\n",irq);
+                       dev->irq=irq;
+               }
        }else if(irq==0){
                printk("(no irq)\n");
        }else{