Subject: Re: [PATCH] e1000: check the return of pci_get_drvdata() in e1000_remove()

From: Stephen Hemminger <[email-masked]>
Date: Tue, 22 May 2018 18:47:02 -0700

On Tue, 22 May 2018 17:17:43 -0700
Bo Chen <[email-masked]> wrote:

> This check on pci_get_drvdata() prevents potential invalid pointer dereferences,
> and is a common practice in *_remove() functions from other drivers, such as
> 'intel/e100.c', 'amd/pcnet32.c', 'realtek/8139too.c', and 'broadcom/tg3.c'.
> 
> Signed-off-by: Bo Chen <[email-masked]>

Why check for something that can never be true.
You are creating dead code paths that can never be exercised.