[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20180522184702.64cd62f6@xeon-e3>
Date: Tue, 22 May 2018 18:47:02 -0700
From: Stephen Hemminger <stephen@...workplumber.org>
To: Bo Chen <chenbo@....edu>
Cc: jeffrey.t.kirsher@...el.com, davem@...emloft.net,
intel-wired-lan@...ts.osuosl.org, netdev@...r.kernel.org,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH] e1000: check the return of pci_get_drvdata() in
e1000_remove()
On Tue, 22 May 2018 17:17:43 -0700
Bo Chen <chenbo@....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@....edu>
Why check for something that can never be true.
You are creating dead code paths that can never be exercised.
Powered by blists - more mailing lists