[Intel-wired-lan] [PATCH] e1000: check the return of pci_get_drvdata() in e1000_remove()
Stephen Hemminger
stephen at networkplumber.org
Wed May 23 01:47:02 UTC 2018
On Tue, 22 May 2018 17:17:43 -0700
Bo Chen <chenbo at pdx.edu> 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 <chenbo at pdx.edu>
Why check for something that can never be true.
You are creating dead code paths that can never be exercised.
More information about the Intel-wired-lan
mailing list