diff options
| author | Mehdi Djait <[email protected]> | 2024-12-11 13:30:45 +0000 |
|---|---|---|
| committer | Mauro Carvalho Chehab <[email protected]> | 2024-12-19 11:50:14 +0000 |
| commit | 6fdbff0f54786e94f0f630ff200ec1d666b1633e (patch) | |
| tree | 1740dad6d03bc460ee50ef6ace910a784dc43f6a /drivers/media/i2c/ccs/ccs-core.c | |
| parent | media: rcar-csi2: Allow specifying C-PHY line order (diff) | |
| download | kernel-6fdbff0f54786e94f0f630ff200ec1d666b1633e.tar.gz kernel-6fdbff0f54786e94f0f630ff200ec1d666b1633e.zip | |
media: ccs: Fix cleanup order in ccs_probe()
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: a11d3d6891f0 ("media: ccs: Read CCS static data from firmware binaries")
Cc: [email protected]
Signed-off-by: Mehdi Djait <[email protected]>
Signed-off-by: Sakari Ailus <[email protected]>
Signed-off-by: Mauro Carvalho Chehab <[email protected]>
Diffstat (limited to 'drivers/media/i2c/ccs/ccs-core.c')
| -rw-r--r-- | drivers/media/i2c/ccs/ccs-core.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/media/i2c/ccs/ccs-core.c b/drivers/media/i2c/ccs/ccs-core.c index e1ae0f9fad43..cb21df46bab1 100644 --- a/drivers/media/i2c/ccs/ccs-core.c +++ b/drivers/media/i2c/ccs/ccs-core.c @@ -3566,15 +3566,15 @@ out_disable_runtime_pm: 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); |
