diff options
author | Sakari Ailus <sakari.ailus@linux.intel.com> | 2019-10-17 08:17:05 -0300 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab+samsung@kernel.org> | 2019-10-24 18:54:30 -0300 |
commit | 4a9a75923acb7f6333a0f3c4090d20709710067a (patch) | |
tree | adca627390be1da6f75513334b4dc57c91c3bcd4 /drivers/media | |
parent | 33e17ea2d4f0519dfd82548cbfe9850fe3e64271 (diff) | |
download | linux-4a9a75923acb7f6333a0f3c4090d20709710067a.tar.gz linux-4a9a75923acb7f6333a0f3c4090d20709710067a.tar.bz2 linux-4a9a75923acb7f6333a0f3c4090d20709710067a.zip |
media: smiapp: Destroy sensor's mutex
Destroy the mutex initialised by the driver in probe.
Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
Diffstat (limited to 'drivers/media')
-rw-r--r-- | drivers/media/i2c/smiapp/smiapp-core.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/drivers/media/i2c/smiapp/smiapp-core.c b/drivers/media/i2c/smiapp/smiapp-core.c index a274527987b8..ea118e04dcdb 100644 --- a/drivers/media/i2c/smiapp/smiapp-core.c +++ b/drivers/media/i2c/smiapp/smiapp-core.c @@ -2881,7 +2881,6 @@ static int smiapp_probe(struct i2c_client *client) return -ENOMEM; sensor->hwcfg = hwcfg; - mutex_init(&sensor->mutex); sensor->src = &sensor->ssds[sensor->ssds_used]; v4l2_i2c_subdev_init(&sensor->src->sd, client, &smiapp_ops); @@ -2945,6 +2944,8 @@ static int smiapp_probe(struct i2c_client *client) if (rval < 0) return rval; + mutex_init(&sensor->mutex); + rval = smiapp_identify_module(sensor); if (rval) { rval = -ENODEV; @@ -3134,6 +3135,7 @@ out_cleanup: out_power_off: smiapp_power_off(&client->dev); + mutex_destroy(&sensor->mutex); return rval; } @@ -3156,6 +3158,7 @@ static int smiapp_remove(struct i2c_client *client) media_entity_cleanup(&sensor->ssds[i].sd.entity); } smiapp_cleanup(sensor); + mutex_destroy(&sensor->mutex); return 0; } |