media: mantis: fix two smatch errors
authorHans Verkuil <hverkuil-cisco@xs4all.nl>
Sun, 3 Nov 2019 11:23:38 +0000 (12:23 +0100)
committerMauro Carvalho Chehab <mchehab@kernel.org>
Fri, 8 Nov 2019 06:30:47 +0000 (07:30 +0100)
Drop two dprintk's that relied on a non-NULL mantis pointer
when it was in fact a NULL pointer.

Fix those warnings:

drivers/media/pci/mantis/mantis_cards.c:73 mantis_irq_handler() error: we previously assumed 'mantis' could be null (see line 72)
drivers/media/pci/mantis/hopper_cards.c:64 hopper_irq_handler() error: we previously assumed 'mantis' could be null (see line 63)

Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
drivers/media/pci/mantis/hopper_cards.c
drivers/media/pci/mantis/mantis_cards.c

index 67aebe75923269b6bc3e51f57ead23eff2ccbf12..c0bd5d7e148bb13c82d9a34a04fbd6551a5d130d 100644 (file)
@@ -60,10 +60,8 @@ static irqreturn_t hopper_irq_handler(int irq, void *dev_id)
        struct mantis_ca *ca;
 
        mantis = (struct mantis_pci *) dev_id;
-       if (unlikely(!mantis)) {
-               dprintk(MANTIS_ERROR, 1, "Mantis == NULL");
+       if (unlikely(!mantis))
                return IRQ_NONE;
-       }
        ca = mantis->mantis_ca;
 
        stat = mmread(MANTIS_INT_STAT);
index deadd0b92233a5aadb1529a28a00ede4f616bd4f..906e4500d87db7c8258c474b1dc29ea3bf85406c 100644 (file)
@@ -69,10 +69,8 @@ static irqreturn_t mantis_irq_handler(int irq, void *dev_id)
        struct mantis_ca *ca;
 
        mantis = (struct mantis_pci *) dev_id;
-       if (unlikely(mantis == NULL)) {
-               dprintk(MANTIS_ERROR, 1, "Mantis == NULL");
+       if (unlikely(!mantis))
                return IRQ_NONE;
-       }
        ca = mantis->mantis_ca;
 
        stat = mmread(MANTIS_INT_STAT);