diff --git a/[refs] b/[refs] index bf6d569c9544..1420fab8cd30 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 95aeead28a2597cfddf4bb11bcade1b518adf83c +refs/heads/master: 2f20c490aa3d8725305cb6333520b1c6a39858e0 diff --git a/trunk/drivers/media/radio/radio-timb.c b/trunk/drivers/media/radio/radio-timb.c index 7052adc0c0b0..09fc56052d35 100644 --- a/trunk/drivers/media/radio/radio-timb.c +++ b/trunk/drivers/media/radio/radio-timb.c @@ -157,7 +157,7 @@ static int __devinit timbradio_probe(struct platform_device *pdev) goto err; } - tr = kzalloc(sizeof(*tr), GFP_KERNEL); + tr = devm_kzalloc(&pdev->dev, sizeof(*tr), GFP_KERNEL); if (!tr) { err = -ENOMEM; goto err; @@ -177,7 +177,7 @@ static int __devinit timbradio_probe(struct platform_device *pdev) strlcpy(tr->v4l2_dev.name, DRIVER_NAME, sizeof(tr->v4l2_dev.name)); err = v4l2_device_register(NULL, &tr->v4l2_dev); if (err) - goto err_v4l2_dev; + goto err; tr->video_dev.v4l2_dev = &tr->v4l2_dev; @@ -195,8 +195,6 @@ static int __devinit timbradio_probe(struct platform_device *pdev) err_video_req: video_device_release_empty(&tr->video_dev); v4l2_device_unregister(&tr->v4l2_dev); -err_v4l2_dev: - kfree(tr); err: dev_err(&pdev->dev, "Failed to register: %d\n", err); @@ -212,8 +210,6 @@ static int __devexit timbradio_remove(struct platform_device *pdev) v4l2_device_unregister(&tr->v4l2_dev); - kfree(tr); - return 0; }