mirror_ubuntu-kernels/drivers/media/i2c/ccs
Sakari Ailus 607bcc4213 media: i2c: ccs: Check rules is non-NULL
Fix the following smatch warning:

drivers/media/i2c/ccs/ccs-data.c:524 ccs_data_parse_rules() warn: address
of NULL pointer 'rules'

The CCS static data rule parser does not check an if rule has been
obtained before checking for other rule types (which depend on the if
rule). In practice this means parsing invalid CCS static data could lead
to dereferencing a NULL pointer.

Reported-by: Hans Verkuil <hverkuil@xs4all.nl>
Fixes: a6b396f410 ("media: ccs: Add CCS static data parser library")
Cc: stable@vger.kernel.org # for 5.11 and up
Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
2023-08-14 20:27:58 +02:00
..
ccs-core.c media: Switch i2c drivers back to use .probe() 2023-05-25 16:21:21 +02:00
ccs-data-defs.h media: ccs: Add CCS static data parser library 2020-12-03 12:27:28 +01:00
ccs-data.c media: i2c: ccs: Check rules is non-NULL 2023-08-14 20:27:58 +02:00
ccs-data.h media: i2c/ccs: fix kernel-doc header issues 2021-04-06 14:32:19 +02:00
ccs-limits.c media: ccs: Fix the op_pll_multiplier address 2021-06-02 11:51:20 +02:00
ccs-limits.h media: ccs: Fix the op_pll_multiplier address 2021-06-02 11:51:20 +02:00
ccs-quirk.c media: ccs-pll: Add support for decoupled OP domain calculation 2020-12-07 15:53:34 +01:00
ccs-quirk.h media: i2c/ccs: fix kernel-doc header issues 2021-04-06 14:32:19 +02:00
ccs-reg-access.c media: ccs: Switch from standard integer types to kernel ones 2021-01-12 17:56:00 +01:00
ccs-reg-access.h media: ccs: Add support for manufacturer regs from sensor and module files 2020-12-03 12:27:32 +01:00
ccs-regs.h media: ccs: Fix the op_pll_multiplier address 2021-06-02 11:51:20 +02:00
ccs.h media: ccs: Align flipping behaviour with other drivers 2023-04-11 18:54:02 +02:00
Kconfig media: i2c: Remove common dependencies from sensor drivers 2023-08-10 07:58:38 +02:00
Makefile media: ccs: Add CCS static data parser library 2020-12-03 12:27:28 +01:00
smiapp-reg-defs.h media: ccs: Add support for old-style SMIA digital gain 2021-01-12 17:24:07 +01:00