Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 333836
b: refs/heads/master
c: 38a7996
h: refs/heads/master
v: v3
  • Loading branch information
Sachin Kamat authored and Mauro Carvalho Chehab committed Oct 6, 2012
1 parent d9d51b4 commit 5eabde4
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 6 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: 26fdcf0980225f8b3d5fa258d9f41433cb0664ed
refs/heads/master: 38a7996cbb26ddd6b595e2fafa9742aefcb2f115
7 changes: 2 additions & 5 deletions trunk/drivers/media/platform/mem2mem_testdev.c
Original file line number Diff line number Diff line change
Expand Up @@ -1019,15 +1019,15 @@ static int m2mtest_probe(struct platform_device *pdev)
struct video_device *vfd;
int ret;

dev = kzalloc(sizeof(*dev), GFP_KERNEL);
dev = devm_kzalloc(&pdev->dev, sizeof(*dev), GFP_KERNEL);
if (!dev)
return -ENOMEM;

spin_lock_init(&dev->irqlock);

ret = v4l2_device_register(&pdev->dev, &dev->v4l2_dev);
if (ret)
goto free_dev;
return ret;

atomic_set(&dev->num_inst, 0);
mutex_init(&dev->dev_mutex);
Expand Down Expand Up @@ -1073,8 +1073,6 @@ static int m2mtest_probe(struct platform_device *pdev)
video_device_release(vfd);
unreg_dev:
v4l2_device_unregister(&dev->v4l2_dev);
free_dev:
kfree(dev);

return ret;
}
Expand All @@ -1089,7 +1087,6 @@ static int m2mtest_remove(struct platform_device *pdev)
del_timer_sync(&dev->timer);
video_unregister_device(dev->vfd);
v4l2_device_unregister(&dev->v4l2_dev);
kfree(dev);

return 0;
}
Expand Down

0 comments on commit 5eabde4

Please sign in to comment.