]> git.ipfire.org Git - thirdparty/linux.git/commit
staging: media: atomisp: improve cleanup robustness in ia_css_stream_destroy_isp2401()
authorJose A. Perez de Azpillaga <azpijr@gmail.com>
Thu, 26 Mar 2026 21:34:09 +0000 (22:34 +0100)
committerSakari Ailus <sakari.ailus@linux.intel.com>
Wed, 20 May 2026 08:29:32 +0000 (11:29 +0300)
commitf14d52b67e63993e2d184da5f49d884d527dd475
treedf9c3199aaa79a6b287b626021289fb445f7a7f6
parentd133bd6ac9beb934875f924e61900990ceb38678
staging: media: atomisp: improve cleanup robustness in ia_css_stream_destroy_isp2401()

Remove the 'assert(entry)' call. In the atomisp driver, assert() is a
wrapper around BUG(), which intentionally crashes the entire kernel.
This is dangerous and inappropriate for a simple null pointer check
during stream teardown. Replace it with a safe 'if (!entry) continue;'
check.

Change the early 'return' to a 'continue'. In a destruction
path, it is better to proceed with cleaning up as many resources as
possible rather than aborting early, which would result in memory leaks
for the remaining pipes.

Signed-off-by: Jose A. Perez de Azpillaga <azpijr@gmail.com>
Reviewed-by: Dan Carpenter <dan.carpenter@linaro.org>
Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
drivers/staging/media/atomisp/pci/sh_css.c