Skip to content

Commit

Permalink
slip: remove redundant check slip_devs for NULL
Browse files Browse the repository at this point in the history
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>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Matvejchikov Ilya authored and David S. Miller committed Jul 13, 2011
1 parent e28634d commit 9173a88
Showing 1 changed file with 0 additions and 3 deletions.
3 changes: 0 additions & 3 deletions drivers/net/slip.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 9173a88

Please sign in to comment.