* [PATCH 3/4] slip: remove redundant check slip_devs for NULL
@ 2011-07-13 7:46 Matvejchikov Ilya
2011-07-13 9:32 ` David Miller
0 siblings, 1 reply; 2+ messages in thread
From: Matvejchikov Ilya @ 2011-07-13 7:46 UTC (permalink / raw)
To: netdev; +Cc: matvejchikov
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
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH 3/4] slip: remove redundant check slip_devs for NULL
2011-07-13 7:46 [PATCH 3/4] slip: remove redundant check slip_devs for NULL Matvejchikov Ilya
@ 2011-07-13 9:32 ` David Miller
0 siblings, 0 replies; 2+ messages in thread
From: David Miller @ 2011-07-13 9:32 UTC (permalink / raw)
To: matvejchikov; +Cc: netdev
From: Matvejchikov Ilya <matvejchikov@gmail.com>
Date: Wed, 13 Jul 2011 11:46:57 +0400
> 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>
Applied.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2011-07-13 9:32 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-07-13 7:46 [PATCH 3/4] slip: remove redundant check slip_devs for NULL Matvejchikov Ilya
2011-07-13 9:32 ` David Miller
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).