[2/2,media] soc_camera_platform: Remove redundant platform_set_drvdata()

Message ID 1368436761-12183-2-git-send-email-sachin.kamat@linaro.org (mailing list archive)
State Accepted, archived
Delegated to: Guennadi Liakhovetski
Headers

Commit Message

Sachin Kamat May 13, 2013, 9:19 a.m. UTC
  Commit 0998d06310 (device-core: Ensure drvdata = NULL when no
driver is bound) removes the need to set driver data field to
NULL.

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
---
 .../platform/soc_camera/soc_camera_platform.c      |    7 -------
 1 file changed, 7 deletions(-)
  

Patch

diff --git a/drivers/media/platform/soc_camera/soc_camera_platform.c b/drivers/media/platform/soc_camera/soc_camera_platform.c
index 1b7a88c..bf0bdd0 100644
--- a/drivers/media/platform/soc_camera/soc_camera_platform.c
+++ b/drivers/media/platform/soc_camera/soc_camera_platform.c
@@ -166,14 +166,8 @@  static int soc_camera_platform_probe(struct platform_device *pdev)
 	strncpy(priv->subdev.name, dev_name(&pdev->dev), V4L2_SUBDEV_NAME_SIZE);
 
 	ret = v4l2_device_register_subdev(&ici->v4l2_dev, &priv->subdev);
-	if (ret)
-		goto evdrs;
 
 	return ret;
-
-evdrs:
-	platform_set_drvdata(pdev, NULL);
-	return ret;
 }
 
 static int soc_camera_platform_remove(struct platform_device *pdev)
@@ -183,7 +177,6 @@  static int soc_camera_platform_remove(struct platform_device *pdev)
 
 	p->icd->control = NULL;
 	v4l2_device_unregister_subdev(&priv->subdev);
-	platform_set_drvdata(pdev, NULL);
 	return 0;
 }