mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-05 02:21:52 +09:00
media: ccs: Fix cleanup order in ccs_probe()
commit 6fdbff0f54786e94f0f630ff200ec1d666b1633e upstream.
ccs_limits is allocated in ccs_read_all_limits() after the allocation of
mdata.backing. Ensure that resources are freed in the reverse order of
their allocation by moving out_free_ccs_limits up.
Fixes: a11d3d6891 ("media: ccs: Read CCS static data from firmware binaries")
Cc: stable@vger.kernel.org
Signed-off-by: Mehdi Djait <mehdi.djait@linux.intel.com>
Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
33da7da2c5
commit
26f7a4767c
@@ -3649,15 +3649,15 @@ out_media_entity_cleanup:
|
||||
out_cleanup:
|
||||
ccs_cleanup(sensor);
|
||||
|
||||
out_free_ccs_limits:
|
||||
kfree(sensor->ccs_limits);
|
||||
|
||||
out_release_mdata:
|
||||
kvfree(sensor->mdata.backing);
|
||||
|
||||
out_release_sdata:
|
||||
kvfree(sensor->sdata.backing);
|
||||
|
||||
out_free_ccs_limits:
|
||||
kfree(sensor->ccs_limits);
|
||||
|
||||
out_power_off:
|
||||
ccs_power_off(&client->dev);
|
||||
mutex_destroy(&sensor->mutex);
|
||||
|
||||
Reference in New Issue
Block a user