aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/clk/qcom/apcs-msm8916.c
diff options
context:
space:
mode:
authorWei Yongjun <weiyongjun1@huawei.com>2018-01-04 06:36:34 +0000
committerStephen Boyd <sboyd@kernel.org>2018-03-12 15:12:26 -0700
commit9903e41ae1f5d50c93f268ca3304d4d7c64b9311 (patch)
tree16ac167d80f1884174dc0c4b748ef73f747b2982 /drivers/clk/qcom/apcs-msm8916.c
parentMerge branch 'clk-helpers' (early part) into clk-fixes (diff)
downloadlinux-dev-9903e41ae1f5d50c93f268ca3304d4d7c64b9311.tar.xz
linux-dev-9903e41ae1f5d50c93f268ca3304d4d7c64b9311.zip
clk: hisilicon: hi3660:Fix potential NULL dereference in hi3660_stub_clk_probe()
platform_get_resource() may return NULL, add proper check to avoid potential NULL dereferencing. This is detected by Coccinelle semantic patch. @@ expression pdev, res, n, t, e, e1, e2; @@ res = platform_get_resource(pdev, t, n); + if (!res) + return -EINVAL; ... when != res == NULL e = devm_ioremap(e1, res->start, e2); Fixes: 4f16f7ff3bc0 ("clk: hisilicon: Add support for Hi3660 stub clocks") Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com> Signed-off-by: Stephen Boyd <sboyd@kernel.org>
Diffstat (limited to 'drivers/clk/qcom/apcs-msm8916.c')
0 files changed, 0 insertions, 0 deletions