1
0
Fork 0
mirror of synced 2025-03-06 20:59:54 +01:00
linux/drivers/platform/x86/intel/int3472
Daniel Scally c005828744 platform/x86: intel_skl_int3472: Correct null check
The int3472-discrete driver can enter an error path after initialising
int3472->clock.ena_gpio, but before it has registered the clock. This will
cause a NULL pointer dereference, because clkdev_drop() is not null aware.
Instead of guarding the call to skl_int3472_unregister_clock() by checking
for .ena_gpio, check specifically for the presence of the clk_lookup, which
will guarantee clkdev_create() has already been called.

Bug: https://bugzilla.kernel.org/show_bug.cgi?id=214453
Fixes: 7540599a5e ("platform/x86: intel_skl_int3472: Provide skl_int3472_unregister_clock()")
Signed-off-by: Daniel Scally <djrscally@gmail.com>
Link: https://lore.kernel.org/r/20211008224608.415949-1-djrscally@gmail.com
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
2021-10-11 15:54:44 +02:00
..
intel_skl_int3472_clk_and_regulator.c platform/x86: intel_skl_int3472: Move to intel/ subfolder 2021-06-22 11:32:02 +02:00
intel_skl_int3472_common.c platform/x86: intel_skl_int3472: Move to intel/ subfolder 2021-06-22 11:32:02 +02:00
intel_skl_int3472_common.h platform/x86: intel_skl_int3472: Move to intel/ subfolder 2021-06-22 11:32:02 +02:00
intel_skl_int3472_discrete.c platform/x86: intel_skl_int3472: Correct null check 2021-10-11 15:54:44 +02:00
intel_skl_int3472_tps68470.c platform/x86: intel_skl_int3472: Move to intel/ subfolder 2021-06-22 11:32:02 +02:00
Kconfig platform/x86: intel_skl_int3472: Move to intel/ subfolder 2021-06-22 11:32:02 +02:00
Makefile platform/x86/intel: int3472: Use y instead of objs in Makefile 2021-08-12 09:26:28 +02:00