diff options
author | Zhang Changzhong <zhangchangzhong@huawei.com> | 2020-12-04 16:31:57 +0800 |
---|---|---|
committer | Krzysztof Kozlowski <krzk@kernel.org> | 2020-12-05 14:57:52 +0100 |
commit | 4bfa07300b9334b487ed4f3d4901c35ebb31b7ca (patch) | |
tree | 91f0497fd06df7d1113d370844c31f6294c01933 /crypto/algif_rng.c | |
parent | d77d22d701b0471584abe1871570bb43deb6e3c4 (diff) | |
download | linux-4bfa07300b9334b487ed4f3d4901c35ebb31b7ca.tar.gz linux-4bfa07300b9334b487ed4f3d4901c35ebb31b7ca.tar.bz2 linux-4bfa07300b9334b487ed4f3d4901c35ebb31b7ca.zip |
memory: jz4780_nemc: Fix potential NULL dereference in jz4780_nemc_probe()
platform_get_resource() may fail and return NULL, so we should
better check it's return value to avoid a NULL pointer dereference
a bit later in the code.
This is detected by Coccinelle semantic patch.
Fixes: 911a88829725 ("memory: jz4780-nemc: driver for the NEMC on JZ4780 SoCs")
Signed-off-by: Zhang Changzhong <zhangchangzhong@huawei.com>
Acked-by: Paul Cercueil <paul@crapouillou.net>
Link: https://lore.kernel.org/r/1607070717-32880-1-git-send-email-zhangchangzhong@huawei.com
Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>
Diffstat (limited to 'crypto/algif_rng.c')
0 files changed, 0 insertions, 0 deletions