]> git.baikalelectronics.ru Git - kernel.git/commit
ARM: omap2+: hwmod: fix potential NULL pointer access
authorTero Kristo <t-kristo@ti.com>
Tue, 20 Jul 2021 18:47:10 +0000 (11:47 -0700)
committerTony Lindgren <tony@atomide.com>
Tue, 27 Jul 2021 08:10:37 +0000 (11:10 +0300)
commit68fa756b07adacf8f325bd11b42b67a88f4c3555
tree6761604f9ced490876f172b406b9785182a16506
parent01da9c8979f3d24bb75ef7080a8d9915e88dff94
ARM: omap2+: hwmod: fix potential NULL pointer access

omap_hwmod_get_pwrdm() may access a NULL clk_hw pointer in some failure
cases. Add a check for the case and bail out gracely if this happens.

Reported-by: Dan Murphy <dmurphy@ti.com>
Signed-off-by: Tero Kristo <t-kristo@ti.com>
Cc: stable@vger.kernel.org # v5.10+
Signed-off-by: Kevin Hilman <khilman@baylibre.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
arch/arm/mach-omap2/omap_hwmod.c