Commit 4a9a7592 authored by Sakari Ailus's avatar Sakari Ailus Committed by Mauro Carvalho Chehab

media: smiapp: Destroy sensor's mutex

Destroy the mutex initialised by the driver in probe.
Signed-off-by: default avatarSakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab+samsung@kernel.org>
parent 33e17ea2
...@@ -2881,7 +2881,6 @@ static int smiapp_probe(struct i2c_client *client) ...@@ -2881,7 +2881,6 @@ static int smiapp_probe(struct i2c_client *client)
return -ENOMEM; return -ENOMEM;
sensor->hwcfg = hwcfg; sensor->hwcfg = hwcfg;
mutex_init(&sensor->mutex);
sensor->src = &sensor->ssds[sensor->ssds_used]; sensor->src = &sensor->ssds[sensor->ssds_used];
v4l2_i2c_subdev_init(&sensor->src->sd, client, &smiapp_ops); v4l2_i2c_subdev_init(&sensor->src->sd, client, &smiapp_ops);
...@@ -2945,6 +2944,8 @@ static int smiapp_probe(struct i2c_client *client) ...@@ -2945,6 +2944,8 @@ static int smiapp_probe(struct i2c_client *client)
if (rval < 0) if (rval < 0)
return rval; return rval;
mutex_init(&sensor->mutex);
rval = smiapp_identify_module(sensor); rval = smiapp_identify_module(sensor);
if (rval) { if (rval) {
rval = -ENODEV; rval = -ENODEV;
...@@ -3134,6 +3135,7 @@ static int smiapp_probe(struct i2c_client *client) ...@@ -3134,6 +3135,7 @@ static int smiapp_probe(struct i2c_client *client)
out_power_off: out_power_off:
smiapp_power_off(&client->dev); smiapp_power_off(&client->dev);
mutex_destroy(&sensor->mutex);
return rval; return rval;
} }
...@@ -3156,6 +3158,7 @@ static int smiapp_remove(struct i2c_client *client) ...@@ -3156,6 +3158,7 @@ static int smiapp_remove(struct i2c_client *client)
media_entity_cleanup(&sensor->ssds[i].sd.entity); media_entity_cleanup(&sensor->ssds[i].sd.entity);
} }
smiapp_cleanup(sensor); smiapp_cleanup(sensor);
mutex_destroy(&sensor->mutex);
return 0; return 0;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment