summaryrefslogtreecommitdiffstats
path: root/drivers/media/video/saa7164/saa7164-api.c
diff options
context:
space:
mode:
authorPeter Huewe <PeterHuewe@gmx.de>2011-01-30 16:33:01 -0300
committerMauro Carvalho Chehab <mchehab@redhat.com>2011-03-21 20:32:19 -0300
commit61ca1500c5ee04f2be34a4f58bb9baed0214b7a9 (patch)
treeef71d383209c305352710cfac4a34fe068886af6 /drivers/media/video/saa7164/saa7164-api.c
parent7ee9e64a3d7379fd443090880158374181f754cf (diff)
downloadlinux-stable-61ca1500c5ee04f2be34a4f58bb9baed0214b7a9.tar.gz
linux-stable-61ca1500c5ee04f2be34a4f58bb9baed0214b7a9.tar.bz2
linux-stable-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-api.c')
-rw-r--r--drivers/media/video/saa7164/saa7164-api.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/drivers/media/video/saa7164/saa7164-api.c b/drivers/media/video/saa7164/saa7164-api.c
index bd86d970f4c2..8a98ab68239e 100644
--- a/drivers/media/video/saa7164/saa7164-api.c
+++ b/drivers/media/video/saa7164/saa7164-api.c
@@ -743,7 +743,7 @@ int saa7164_api_configure_dif(struct saa7164_port *port, u32 std)
int saa7164_api_initialize_dif(struct saa7164_port *port)
{
struct saa7164_dev *dev = port->dev;
- struct saa7164_port *p = 0;
+ struct saa7164_port *p = NULL;
int ret = -EINVAL;
u32 std = 0;
@@ -926,9 +926,9 @@ int saa7164_api_configure_port_mpeg2ps(struct saa7164_dev *dev,
int saa7164_api_dump_subdevs(struct saa7164_dev *dev, u8 *buf, int len)
{
- struct saa7164_port *tsport = 0;
- struct saa7164_port *encport = 0;
- struct saa7164_port *vbiport = 0;
+ struct saa7164_port *tsport = NULL;
+ struct saa7164_port *encport = NULL;
+ struct saa7164_port *vbiport = NULL;
u32 idx, next_offset;
int i;
struct tmComResDescrHeader *hdr, *t;
@@ -1340,7 +1340,7 @@ int saa7164_api_enum_subdevs(struct saa7164_dev *dev)
/* Allocate enough storage for all of the descs */
buf = kzalloc(buflen, GFP_KERNEL);
- if (buf == NULL)
+ if (!buf)
return SAA_ERR_NO_RESOURCES;
/* Retrieve them */