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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Add missing initialization code to the 'sensor' data
structure variable before using it.

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

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);
-- 
1.7.9.5

--
To unsubscribe from this list: send the line "unsubscribe linux-media" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux Input]     [Video for Linux]     [Gstreamer Embedded]     [Mplayer Users]     [Linux USB Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]
  Powered by Linux