Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 219221
b: refs/heads/master
c: 85c55ef
h: refs/heads/master
i:
  219219: 8583069
v: v3
  • Loading branch information
Jarkko Nikula authored and Mauro Carvalho Chehab committed Oct 21, 2010
1 parent e529103 commit b89f3ac
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 3 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 73f4d265f660be3d69ee930bbf55c9ba069be079
refs/heads/master: 85c55efb0a20c5dac435a6817ffb20fe988b9122
10 changes: 8 additions & 2 deletions trunk/drivers/media/radio/radio-si4713.c
Original file line number Diff line number Diff line change
Expand Up @@ -296,14 +296,14 @@ static int radio_si4713_pdriver_probe(struct platform_device *pdev)
if (!sd) {
dev_err(&pdev->dev, "Cannot get v4l2 subdevice\n");
rval = -ENODEV;
goto unregister_v4l2_dev;
goto put_adapter;
}

rsdev->radio_dev = video_device_alloc();
if (!rsdev->radio_dev) {
dev_err(&pdev->dev, "Failed to alloc video device.\n");
rval = -ENOMEM;
goto unregister_v4l2_dev;
goto put_adapter;
}

memcpy(rsdev->radio_dev, &radio_si4713_vdev_template,
Expand All @@ -320,6 +320,8 @@ static int radio_si4713_pdriver_probe(struct platform_device *pdev)

free_vdev:
video_device_release(rsdev->radio_dev);
put_adapter:
i2c_put_adapter(adapter);
unregister_v4l2_dev:
v4l2_device_unregister(&rsdev->v4l2_dev);
free_rsdev:
Expand All @@ -335,8 +337,12 @@ static int __exit radio_si4713_pdriver_remove(struct platform_device *pdev)
struct radio_si4713_device *rsdev = container_of(v4l2_dev,
struct radio_si4713_device,
v4l2_dev);
struct v4l2_subdev *sd = list_entry(v4l2_dev->subdevs.next,
struct v4l2_subdev, list);
struct i2c_client *client = v4l2_get_subdevdata(sd);

video_unregister_device(rsdev->radio_dev);
i2c_put_adapter(client->adapter);
v4l2_device_unregister(&rsdev->v4l2_dev);
kfree(rsdev);

Expand Down

0 comments on commit b89f3ac

Please sign in to comment.