netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Matvejchikov Ilya <matvejchikov@gmail.com>
To: netdev@vger.kernel.org
Cc: matvejchikov@gmail.com
Subject: [PATCH 3/4] slip: remove redundant check slip_devs for NULL
Date: Wed, 13 Jul 2011 11:46:57 +0400	[thread overview]
Message-ID: <CAKh5naa_ARaJvZFOMva9V22YCTkVyPMw1+-x=GTtx-niwpOFSg@mail.gmail.com> (raw)

As slip_devs is initialized on module load stage there is no reason to
check it for NULL anywhere instead of the deinitialization routine because
if we can't get enough memory on startup we don't run at all.

Signed-off-by: Matvejchikov Ilya <matvejchikov@gmail.com>
---
 drivers/net/slip.c |    3 ---
 1 files changed, 0 insertions(+), 3 deletions(-)

diff --git a/drivers/net/slip.c b/drivers/net/slip.c
index d724d47..6f97c59 100644
--- a/drivers/net/slip.c
+++ b/drivers/net/slip.c
@@ -726,9 +726,6 @@ static struct slip *sl_alloc(dev_t line)
 	struct net_device *dev = NULL;
 	struct slip       *sl;

-	if (slip_devs == NULL)
-		return NULL;	/* Master array missing ! */
-
 	for (i = 0; i < slip_maxdev; i++) {
 		dev = slip_devs[i];
 		if (dev == NULL)
-- 
1.7.6

             reply	other threads:[~2011-07-13  7:47 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-07-13  7:46 Matvejchikov Ilya [this message]
2011-07-13  9:32 ` [PATCH 3/4] slip: remove redundant check slip_devs for NULL David Miller

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:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

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

  git send-email \
    --in-reply-to='CAKh5naa_ARaJvZFOMva9V22YCTkVyPMw1+-x=GTtx-niwpOFSg@mail.gmail.com' \
    --to=matvejchikov@gmail.com \
    --cc=netdev@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).