* [Intel-wired-lan] [PATCH] e1000: check the return of pci_get_drvdata() in e1000_remove()
[not found] <20180523001743.8492-1-chenbo@pdx.edu>
@ 2018-05-23 1:47 ` Stephen Hemminger
0 siblings, 0 replies; only message in thread
From: Stephen Hemminger @ 2018-05-23 1:47 UTC (permalink / raw)
To: intel-wired-lan
On Tue, 22 May 2018 17:17:43 -0700
Bo Chen <chenbo@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@pdx.edu>
Why check for something that can never be true.
You are creating dead code paths that can never be exercised.
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2018-05-23 1:47 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <20180523001743.8492-1-chenbo@pdx.edu>
2018-05-23 1:47 ` [Intel-wired-lan] [PATCH] e1000: check the return of pci_get_drvdata() in e1000_remove() Stephen Hemminger
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox