diff options
author | Peter Huewe <PeterHuewe@gmx.de> | 2011-01-30 20:33:01 +0100 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2011-03-22 00:32:19 +0100 |
commit | 61ca1500c5ee04f2be34a4f58bb9baed0214b7a9 (patch) | |
tree | ef71d383209c305352710cfac4a34fe068886af6 /drivers/media/video/saa7164/saa7164-vbi.c | |
parent | [media] cx18: fix kernel oops when setting MPEG control before capturing (diff) | |
download | linux-61ca1500c5ee04f2be34a4f58bb9baed0214b7a9.tar.xz linux-61ca1500c5ee04f2be34a4f58bb9baed0214b7a9.zip |
[media] video/saa7164: Fix sparse warning: Using plain integer as NULL pointer
This patch fixes the warning "Using plain integer as NULL pointer",
generated by sparse, by replacing
if (var == 0)
with
if (!var)
after an allocation
and all other offending 0s with NULL.
KernelVersion: linus' tree-1f0324c
Signed-off-by: Peter Huewe <peterhuewe@gmx.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media/video/saa7164/saa7164-vbi.c')
-rw-r--r-- | drivers/media/video/saa7164/saa7164-vbi.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/media/video/saa7164/saa7164-vbi.c b/drivers/media/video/saa7164/saa7164-vbi.c index 8abbe6d661e4..9e5b01c29cf5 100644 --- a/drivers/media/video/saa7164/saa7164-vbi.c +++ b/drivers/media/video/saa7164/saa7164-vbi.c @@ -123,8 +123,8 @@ static int saa7164_vbi_buffers_alloc(struct saa7164_port *port) ((params->numberoflines * params->pitch) / PAGE_SIZE); params->bitspersample = 8; params->linethreshold = 0; - params->pagetablelistvirt = 0; - params->pagetablelistphys = 0; + params->pagetablelistvirt = NULL; + params->pagetablelistphys = NULL; params->numpagetableentries = port->hwcfg.buffercount; /* Allocate the PCI resources, buffers (hard) */ @@ -1054,7 +1054,7 @@ static int fops_release(struct file *file) struct saa7164_user_buffer *saa7164_vbi_next_buf(struct saa7164_port *port) { - struct saa7164_user_buffer *ubuf = 0; + struct saa7164_user_buffer *ubuf = NULL; struct saa7164_dev *dev = port->dev; u32 crc; @@ -1334,7 +1334,7 @@ int saa7164_vbi_register(struct saa7164_port *port) port->v4l_device = saa7164_vbi_alloc(port, dev->pci, &saa7164_vbi_template, "vbi"); - if (port->v4l_device == NULL) { + if (!port->v4l_device) { printk(KERN_INFO "%s: can't allocate vbi device\n", dev->name); result = -ENOMEM; |