aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorMauro Carvalho Chehab <mchehab@redhat.com>2009-01-04 23:42:38 -0500
committerMauro Carvalho Chehab <mchehab@redhat.com>2009-01-07 19:18:55 -0500
commit432663375b04ed9700ea7d3c8e737432d1be6490 (patch)
treeef104ff2f05dbda7f710ba91511a1aef8599cd65 /drivers
parentffbc5f88148ff77039a4269e3f945e8471b2e0bb (diff)
V4L/DVB (10181): v4l2-device: Fix some sparse warnings
/home/v4l/master/v4l/v4l2-device.c:32:2: warning: Using plain integer as NULL pointer /home/v4l/master/v4l/v4l2-device.c:64:2: warning: Using plain integer as NULL pointer Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/media/video/v4l2-device.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/media/video/v4l2-device.c b/drivers/media/video/v4l2-device.c
index 9eefde031597..cf9d4c7f571a 100644
--- a/drivers/media/video/v4l2-device.c
+++ b/drivers/media/video/v4l2-device.c
@@ -29,7 +29,7 @@ int v4l2_device_register(struct device *dev, struct v4l2_device *v4l2_dev)
29 if (dev == NULL || v4l2_dev == NULL) 29 if (dev == NULL || v4l2_dev == NULL)
30 return -EINVAL; 30 return -EINVAL;
31 /* Warn if we apparently re-register a device */ 31 /* Warn if we apparently re-register a device */
32 WARN_ON(dev_get_drvdata(dev)); 32 WARN_ON(dev_get_drvdata(dev) != NULL);
33 INIT_LIST_HEAD(&v4l2_dev->subdevs); 33 INIT_LIST_HEAD(&v4l2_dev->subdevs);
34 spin_lock_init(&v4l2_dev->lock); 34 spin_lock_init(&v4l2_dev->lock);
35 v4l2_dev->dev = dev; 35 v4l2_dev->dev = dev;
@@ -61,7 +61,7 @@ int v4l2_device_register_subdev(struct v4l2_device *dev, struct v4l2_subdev *sd)
61 if (dev == NULL || sd == NULL || !sd->name[0]) 61 if (dev == NULL || sd == NULL || !sd->name[0])
62 return -EINVAL; 62 return -EINVAL;
63 /* Warn if we apparently re-register a subdev */ 63 /* Warn if we apparently re-register a subdev */
64 WARN_ON(sd->dev); 64 WARN_ON(sd->dev != NULL);
65 if (!try_module_get(sd->owner)) 65 if (!try_module_get(sd->owner))
66 return -ENODEV; 66 return -ENODEV;
67 sd->dev = dev; 67 sd->dev = dev;