]> pilppa.com Git - linux-2.6-omap-h63xx.git/commitdiff
V4L/DVB (10181): v4l2-device: Fix some sparse warnings
authorMauro Carvalho Chehab <mchehab@redhat.com>
Mon, 5 Jan 2009 04:42:38 +0000 (01:42 -0300)
committerMauro Carvalho Chehab <mchehab@redhat.com>
Thu, 8 Jan 2009 00:18:55 +0000 (22:18 -0200)
/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>
drivers/media/video/v4l2-device.c

index 9eefde031597d17e9c41a1f74c66d7b7a707f6eb..cf9d4c7f571a369741456a26576a5714975a1119 100644 (file)
@@ -29,7 +29,7 @@ int v4l2_device_register(struct device *dev, struct v4l2_device *v4l2_dev)
        if (dev == NULL || v4l2_dev == NULL)
                return -EINVAL;
        /* Warn if we apparently re-register a device */
-       WARN_ON(dev_get_drvdata(dev));
+       WARN_ON(dev_get_drvdata(dev) != NULL);
        INIT_LIST_HEAD(&v4l2_dev->subdevs);
        spin_lock_init(&v4l2_dev->lock);
        v4l2_dev->dev = dev;
@@ -61,7 +61,7 @@ int v4l2_device_register_subdev(struct v4l2_device *dev, struct v4l2_subdev *sd)
        if (dev == NULL || sd == NULL || !sd->name[0])
                return -EINVAL;
        /* Warn if we apparently re-register a subdev */
-       WARN_ON(sd->dev);
+       WARN_ON(sd->dev != NULL);
        if (!try_module_get(sd->owner))
                return -ENODEV;
        sd->dev = dev;