Re: [PATCH] memory: jz4780_nemc: Fix potential NULL dereference in jz4780_nemc_probe()

From: Krzysztof Kozlowski
Date: Sat Dec 05 2020 - 11:36:54 EST


On Fri, 4 Dec 2020 16:31:57 +0800, Zhang Changzhong wrote:
> 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.
>
> @@
> expression pdev, res, n, t, e, e1, e2;
> @@
>
> [...]

Applied, thanks!

[1/1] memory: jz4780_nemc: Fix potential NULL dereference in jz4780_nemc_probe()
commit: 4bfa07300b9334b487ed4f3d4901c35ebb31b7ca

Best regards,
--
Krzysztof Kozlowski <krzk@xxxxxxxxxx>