Skip to content

Commit

Permalink
V4L/DVB (10181): v4l2-device: Fix some sparse warnings
Browse files Browse the repository at this point in the history
/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>
  • Loading branch information
Mauro Carvalho Chehab committed Jan 8, 2009
1 parent ffbc5f8 commit 4326633
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions drivers/media/video/v4l2-device.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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;
Expand Down

0 comments on commit 4326633

Please sign in to comment.