Re: [PATCH] fsl/fman: Check for null pointer after calling devm_ioremap

From: patchwork-bot+netdevbpf
Date: Thu Jan 06 2022 - 09:00:39 EST


Hello:

This patch was applied to netdev/net.git (master)
by David S. Miller <davem@xxxxxxxxxxxxx>:

On Thu, 6 Jan 2022 18:04:10 +0800 you wrote:
> As the possible failure of the allocation, the devm_ioremap() may return
> NULL pointer.
> Take tgec_initialization() as an example.
> If allocation fails, the params->base_addr will be NULL pointer and will
> be assigned to tgec->regs in tgec_config().
> Then it will cause the dereference of NULL pointer in set_mac_address(),
> which is called by tgec_init().
> Therefore, it should be better to add the sanity check after the calling
> of the devm_ioremap().
>
> [...]

Here is the summary with links:
- fsl/fman: Check for null pointer after calling devm_ioremap
https://git.kernel.org/netdev/net/c/d5a73ec96cc5

You are awesome, thank you!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html