diff mbox

[4/5,media] exynos4-is: Initialize 'sensor' before using

Message ID 1366092143-5482-4-git-send-email-sachin.kamat@linaro.org
State Superseded
Headers show

Commit Message

Sachin Kamat April 16, 2013, 6:02 a.m. UTC
Add missing initialization code to the 'sensor' data
structure variable before using it.

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
---
Only compile tested.
---
 drivers/media/platform/exynos4-is/fimc-is-sensor.c |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
diff mbox

Patch

diff --git a/drivers/media/platform/exynos4-is/fimc-is-sensor.c b/drivers/media/platform/exynos4-is/fimc-is-sensor.c
index 02b2719..bda9093 100644
--- a/drivers/media/platform/exynos4-is/fimc-is-sensor.c
+++ b/drivers/media/platform/exynos4-is/fimc-is-sensor.c
@@ -268,7 +268,8 @@  err_gpio:
 
 static int fimc_is_sensor_remove(struct i2c_client *client)
 {
-	struct fimc_is_sensor *sensor;
+	struct v4l2_subdev *sd = i2c_get_clientdata(client);
+	struct fimc_is_sensor *sensor = sd_to_fimc_is_sensor(sd);
 
 	regulator_bulk_free(SENSOR_NUM_SUPPLIES, sensor->supplies);
 	media_entity_cleanup(&sensor->subdev.entity);