kernel-fxtec-pro1x/drivers/clk/hisilicon
Gustavo A. R. Silva 459cfe0a6e reset: hisilicon: fix potential NULL pointer dereference
commit e9a2310fb689151166df7fd9971093362d34bd79 upstream.

There is a potential execution path in which function
platform_get_resource() returns NULL. If this happens,
we will end up having a NULL pointer dereference.

Fix this by replacing devm_ioremap with devm_ioremap_resource,
which has the NULL check and the memory region request.

This code was detected with the help of Coccinelle.

Cc: stable@vger.kernel.org
Fixes: 97b7129cd2 ("reset: hisilicon: change the definition of hisi_reset_init")
Signed-off-by: Gustavo A. R. Silva <gustavo@embeddedor.com>
Signed-off-by: Stephen Boyd <sboyd@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-11-21 09:19:17 +01:00
..
clk-hi3519.c clk: hisilicon: hi3519: add driver remove path and fix some issues 2016-06-30 12:35:20 -07:00
clk-hi3620.c clk: hisilicon: make clk_ops const 2017-11-01 23:25:45 -07:00
clk-hi3660-stub.c clk: hisilicon: hi3660:Fix potential NULL dereference in hi3660_stub_clk_probe() 2018-03-12 15:12:26 -07:00
clk-hi3660.c clk: hi3660: fix incorrect uart3 clock freqency 2017-11-14 09:48:59 -08:00
clk-hi6220-stub.c clk: hisilicon: Remove CLK_IS_ROOT 2016-03-02 17:43:32 -08:00
clk-hi6220.c clk: hi6220: mark clock cs_atb_syspll as critical 2017-11-01 16:39:03 +01:00
clk-hip04.c clk: hisilicon: Remove CLK_IS_ROOT 2016-03-02 17:43:32 -08:00
clk-hisi-phase.c clk: hisilicon: Mark phase_ops static 2018-03-14 14:34:16 -07:00
clk-hix5hd2.c clk: hisilicon: make clk_ops const 2017-11-01 23:25:45 -07:00
clk.c clk: hisilicon: fix potential NULL dereference in hisi_clk_alloc() 2018-03-20 10:23:41 -07:00
clk.h clk: hisilicon: add hisi phase clock support 2018-03-12 15:56:40 +08:00
clkdivider-hi6220.c clk: divider: fix incorrect usage of container_of 2017-12-28 15:16:04 -08:00
clkgate-separated.c Merge branch 'clk-const' into clk-next 2017-11-14 10:07:38 -08:00
crg-hi3516cv300.c clk: hisilicon: mark wdt_mux_p[] as const 2018-03-16 15:57:53 -07:00
crg-hi3798cv200.c clk: hisilicon: add missing usb3 clocks for Hi3798CV200 SoC 2018-05-15 15:12:06 -07:00
crg.h clk: hisilicon: add CRG driver for Hi3798CV200 SoC 2016-11-11 15:43:49 -08:00
Kconfig clk/driver/hisi: Consolidate the Kconfig for the CLOCK_STUB 2018-06-01 12:45:43 -07:00
Makefile clk: hisilicon: add hisi phase clock support 2018-03-12 15:56:40 +08:00
reset.c reset: hisilicon: fix potential NULL pointer dereference 2018-11-21 09:19:17 +01:00
reset.h reset: hisilicon: change the definition of hisi_reset_init 2016-06-30 12:33:22 -07:00