Re: [PATCH v3 net-next] net: rnpgbe: Delete a null pointer check in rnpgbe_rm_adapter()
From: Andrew Lunn
Date: Fri Jul 17 2026 - 12:08:20 EST
On Fri, Jul 17, 2026 at 10:38:32AM +0200, Markus Elfring wrote:
> From: Markus Elfring <elfring@xxxxxxxxxxxxxxxxxxxxx>
> Date: Fri, 17 Jul 2026 10:20:15 +0200
>
> The check for the pointer “mucse” was identified as redundant because
> the relevant address information was preserved according to calls of
> the functions “pci_set_drvdata” and “pci_get_drvdata”.
> Thus remove it.
>
> This issue was detected by using the Coccinelle software.
>
> See also:
> Reconsidering pointer dereferences before null pointer checks (with SmPL)
> 2023-04-09
> https://lore.kernel.org/cocci/1a11455f-ab57-dce0-1677-6beb8492a257@xxxxxx/
> https://sympa.inria.fr/sympa/arc/cocci/2023-04/msg00021.html
>
> Signed-off-by: Markus Elfring <elfring@xxxxxxxxxxxxxxxxxxxxx>
Reviewed-by: Andrew Lunn <andrew@xxxxxxx>
Andrew