]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
media: ccs: Fix cleanup order in ccs_probe()
authorMehdi Djait <mehdi.djait@linux.intel.com>
Wed, 11 Dec 2024 13:30:45 +0000 (14:30 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 17 Feb 2025 09:05:34 +0000 (10:05 +0100)
commitfd551f51908e7a1ce135850b1aaa5740e78f54e0
tree16c482953450c3c6d16bf52cd82d76252fbd587e
parentc85a33577c11acee82895242320af4cebe5b8ec6
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: a11d3d6891f0 ("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>
drivers/media/i2c/ccs/ccs-core.c