Skip to content
Commit 12a016c7 authored by Maxime Ripard's avatar Maxime Ripard Committed by Dom Cobley
Browse files

clk: Test the clock pointer in clk_hw_get_name()



Unlike __clk_get_name(), clk_hw_get_name() doesn't test wether passed
clk_hw pointer is NULL or not and dereferences it directly. This can
then lead to NULL pointer dereference.

Let's make sure the pointer isn't NULL before dereferencing it.

Tested-by: Alexander Stein <alexander.stein@ew.tq-group.com> # imx8mp
Tested-by: Marek Szyprowski <m.szyprowski@samsung.com> # exynos4210, meson g12b
Signed-off-by: default avatarMaxime Ripard <maxime@cerno.tech>
parent 0119ba3f
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment