summaryrefslogtreecommitdiff
path: root/drivers/media/pci/mantis
diff options
context:
space:
mode:
authorMarkus Elfring <elfring@users.sourceforge.net>2017-08-28 06:50:28 -0400
committerMauro Carvalho Chehab <mchehab@s-opensource.com>2017-09-23 08:20:57 -0400
commitaf28c99628ebfbdc3fff3d92c7044d3a51b7ccea (patch)
treeff56a13fbd5ed6c2bb20a746464fd49fb0199c48 /drivers/media/pci/mantis
parent2d3da59ff163b2aa805de0fc65ba933a735b00cd (diff)
media: drivers: Adjust checks for null pointers
The script “checkpatch.pl” pointed information out like the following. Comparison to NULL could be written !… Thus fix the affected source code places. Signed-off-by: Markus Elfring <elfring@users.sourceforge.net> Signed-off-by: Hans Verkuil <hansverk@cisco.com>
Diffstat (limited to 'drivers/media/pci/mantis')
-rw-r--r--drivers/media/pci/mantis/hopper_cards.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/media/pci/mantis/hopper_cards.c b/drivers/media/pci/mantis/hopper_cards.c
index ecb97dc381fb..ed855e3df558 100644
--- a/drivers/media/pci/mantis/hopper_cards.c
+++ b/drivers/media/pci/mantis/hopper_cards.c
@@ -72,7 +72,7 @@ static irqreturn_t hopper_irq_handler(int irq, void *dev_id)
struct mantis_ca *ca;
mantis = (struct mantis_pci *) dev_id;
- if (unlikely(mantis == NULL)) {
+ if (unlikely(!mantis)) {
dprintk(MANTIS_ERROR, 1, "Mantis == NULL");
return IRQ_NONE;
}
@@ -164,7 +164,7 @@ static int hopper_pci_probe(struct pci_dev *pdev,
int err;
mantis = kzalloc(sizeof(*mantis), GFP_KERNEL);
- if (mantis == NULL) {
+ if (!mantis) {
err = -ENOMEM;
goto fail0;
}