Skip to content
Commit 4bfa0730 authored by Zhang Changzhong's avatar Zhang Changzhong Committed by Krzysztof Kozlowski
Browse files

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: 911a8882 ("memory: jz4780-nemc: driver for the NEMC on JZ4780 SoCs")
Signed-off-by: default avatarZhang Changzhong <zhangchangzhong@huawei.com>
Acked-by: default avatarPaul Cercueil <paul@crapouillou.net>
Link: https://lore.kernel.org/r/1607070717-32880-1-git-send-email-zhangchangzhong@huawei.com


Signed-off-by: default avatarKrzysztof Kozlowski <krzk@kernel.org>
parent d77d22d7
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment