LKML Archive on
help / color / mirror / Atom feed
From: Stephen Hemminger <>
To: Bo Chen <>
Subject: Re: [PATCH] e1000: check the return of pci_get_drvdata() in e1000_remove()
Date: Tue, 22 May 2018 18:47:02 -0700	[thread overview]
Message-ID: <20180522184702.64cd62f6@xeon-e3> (raw)
In-Reply-To: <>

On Tue, 22 May 2018 17:17:43 -0700
Bo Chen <> 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 <>

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

  reply	other threads:[~2018-05-23  1:47 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-05-23  0:17 Bo Chen
2018-05-23  1:47 ` Stephen Hemminger [this message]
2018-05-23  3:31   ` Bo Chen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20180522184702.64cd62f6@xeon-e3 \ \ \ \ \ \ \ \
    --subject='Re: [PATCH] e1000: check the return of pci_get_drvdata() in e1000_remove()' \

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).